– 123 Powe rful Instructions – Most Single Clock Cy cle Execution
– 32 x 8 General Purpose Working Registers
– Fully Static Operation
• High Endurance Non-volatile Memory Segments
– 4K/8K Bytes of In-System Self-Programmable Flash program memory(ATtiny48/88)
– 64/64 Bytes EEPROM (ATtiny48/88)
– 256/512 Bytes Internal SRAM (ATtiny48/88)
– Write/Erase Cycles: 10,000 Flash/100,000 EEPROM
– Data retention: 20 years at 85°C / 100 years at 25°C
– Optional Boot Code Section with Indepentent Lock Bits
• In-System Programming by On-chip Boot Program
• True Read-While-Write Operation
– Programming Lock for Software Security
• Peripheral Features
– One 8-bit Timer/Counter with Separate Prescaler and Compare Mode
– One 16-bit Timer/Counter with Prescaler, and Compare and Capture Modes
– 8-channel 10-bit ADC in 32-lead TQFP and 32-pad QFN/MLF package
– 6-channel 10-bit ADC in 28-pin PDIP and 28-pad QFN/MLF package
– Master/Slave SPI Serial Interface
– Byte-oriented 2-wire Serial Interface (Philips I
– Programmable Watchdog Timer with Separate On-chip Oscillator
– On-chip Analog Comparator
– Interrupt and Wake-up on Pin Change
• Special Microcontroller Features
– debugWIRE On-chip Debug System
– In-System Programmable via SPI Port
– Power-on Reset and Pr ogrammab l e Brown-out Detection
– Internal Calibrated Oscillator
– External and Internal Interrupt Sources
– Three Sleep Modes: Idle, ADC Noise Reduction and Power-down
• I/O and Pac kages
– 28 Programmable I/O Lines in 32-lead TQFP and 32-pad QFN/MLF package
– 24 Programmable I/O Lines in 28-pin PDIP and 28-pad QFN/MLF package
– 28-pin PDIP, 32-lead TQFP, 28-pad QFN/MLF and 32-pad QFN/MLF
• Operating Voltage:
– 5.5V
–1.8
• Temperature Range:
–-40°C to +85°C
• Speed Grade:
– 2 MHz @ 1.8 – 5.5V
–0
–0 – 6 MHz @ 2.7 – 5.5V
– 12 MHz @ 4.5 – 5.5V
–0
• Low Power Consumption
– Active Mode: 1 MHz, 1.8V: 240µA
– Power-down Mode: 0.1µA at 1.8V
®
8-Bit Microcontroller
2
C Compatible)
8-bit
Microcontroller
with 4/8K Bytes
In-System
Programmable
Flash
1.1.3Port A (PA3:0) (in 32-lead TQFP and 32-pad QFN/MLF packages, only)
Port A is a 4-bit bi-directional I/O port with internal pull-up resistors (selected for each bit) in 32lead TQFP and 32-pad QFN/MLF package. The PA3..0 output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port A pins that are externally pulled low will source current if the pull-up resistors are activated. The Po rt A pins are tristated when a reset condition becomes active, even if the clock is not runn ing.
1.1.4Port B (PB7:0)
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset co ndition becomes active,
even if the clock is not running.
ATtiny48/88
Depending on the clock selection fuse settings, PB6 can be used as input to the internal clock
operating circuit.
The various special features of Port B are elaborated in “Alternate Functions of Port B” on page
64 and “System Clock and Clock Options” on page 25.
1.1.5Port C (PC7, PC5:0)
Port C is a 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
PC7 and PC5..0 output buffers have symmetrical drive characteristics with both high sink and
source capability. As inputs, Port C pins that are externally pulled low will source current if the
pull-up resistors are activated. The Port C pins are tri-stated when a reset condition becomes
active, even if the clock is not running.
1.1.6PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a r eset input . A low level on this pin f or
longer than the minimum pulse width will generate a reset, even if the clock is not running. The
minimum pulse length is given in Table 22-3 on page 201. Shorter pulses are not guaranteed to
generate a reset.
The various special features of Port C are elaborated in “Alternate Functions of Port C” on page
67.
1.1.7Port D (PD7:0)
8008AS–AVR–06/08
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
PD7..4 output buffers have symmetrical drive characteristics with both high sink and source
capabilities, while the PD3..0 output buffers hav e stronger sink capabilities. As inp uts, Port D
3
ATtiny48/88
pins that are externally pulled low will source current if the pull-up resistors are activated. The
Port D pins are tri-stated when a reset condition becom es active, even if the clock is not running.
The various special features of Port D are elaborated in “Alternate Functions of Port D” on page
70.
1.1.8AV
CC
AVCC is the supply voltage pin for the A/D converter and a selection of I/O pins. This pin should
be externally connec ted to V
mended this pin is connected to V
even if the ADC is not used. If the ADC is used, it is recom-
CC
through a low-pass filter, as described in “Analog Noise
CC
Canceling Techniques” on page 163.
The following pins receive their supply voltage from AV
ages) PA1:0. All other I/O pins take their supply voltage from V
: PC7, PC5:0 and (in 32-lead pack-
CC
.
CC
4
8008AS–AVR–06/08
2.Overview
2.1Block Diagram
ATtiny48/88
The ATtiny48/88 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC
architecture. By executing powerful instructions in a single clock cycle, the ATt iny48/88 achieves
throughputs approaching 1 MIPS pe r MHz allow ing the sy stem de signer to optimize power c onsumption versus processing speed.
Figure 2-1.Block Diagram
GND
Watchdog
Timer
Watchdog
Oscillator
Oscillator
Circuits /
Clock
Generation
EEPROM
16bit T/C 18bit T/C 0A/D Conv.
DATABUS
Powe r
Supervision
POR / BOD &
RESET
VCC
debugWIRE
CPU
Internal
Bandgap
Program
Logic
SRAMFlash
6
2
8008AS–AVR–06/08
Analog
Comp.
SPITWI
PORT C (8)PORT B (8)PORT D (8)
PORT A (4)
RESET
CLKI
PA[0..3] (in TQFP and MLF)PC[0..7]PB[0..7]PD[0..7]
The AVR core combines a rich instruction set with 32 general purpose working registers. All the
32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent
registers to be accessed in one single instruction executed in one clock cycle. The resulting
architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers.
5
ATtiny48/88
The ATtiny48/88 provides the following features: 4/8K bytes of In-System Programmable Flash,
64/64 bytes EEPROM, 256/512 bytes SRAM, 24 general purpose I/O lines (28 I/Os in 32-lead
TQFP and 32-pad QFN/MLF packages), 32 general purpose working registers, two flexible
Timer/Counters with compare modes, internal and external interrupts, a byte-oriented 2-wire
serial interface, an SPI serial port, a 6-channel 10-bit ADC (8 channels in 32-lead TQFP and 32pad QFN/MLF packages), a programmable Watchdog Timer with internal oscillator, and three
software selectable power saving modes. Idle mode stops the CPU while allowing
Timer/Counters, 2-wire serial interface, SPI port, and interrupt system to continue functioning.
Power-down mode saves the register contents but freezes the oscillator, disabling all other chip
functions until the next interrupt or hardware reset. ADC Noise Reduction mode stops the CPU
and all I/O modules except ADC, and helps to minimize switching noise during ADC
conversions.
The device is manufactured using Atmel’s high density non-volatile memory technology. The
On-chip ISP Flash allows the program memory to be reprogrammed In-System through an SPI
serial interface, by a conventional non-volatile memory programmer, or by an On-chip Boot program running on the AVR core. The Boot program can use any interface to download the
application program in the Flash memory. By combining an 8-bit RISC CPU with In-System SelfProgrammable Flash on a monolithic chip, the Atmel ATtiny48/88 is a powerful microcontroller
that provides a highly flexible and cost effective solutio n to many embedded contro l applications.
The ATtiny48/88 AVR is supported by a full suite of program and system development tools
including: C compilers, macro assemblers, program debugger/simulators and evaluation kits.
2.2Comparison Between ATtiny48 and ATtiny88
The ATtiny48 and ATtiny88 differ only in memory sizes. Table 2-1 summarizes the different
memory sizes for the two devices.
A comprehensive set of development tools, application notes and datasheets are available for
download at http://www.atmel.com/avr.
3.2About Code Examples
This documentation contains simple code examples t hat brief ly show h ow to us e various parts of
the device. These code examples assume that the part specific header file is included b efore
compilation. Be aware that not all C compiler vendors include bit definitions in the header files
and interrupt handling in C is compiler dependent . Please con firm wit h the C com piler d ocume ntation for more details.
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”
instructions must be replaced with instructions that allow access to extended I/O. Typically
“LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.
3.3Data Retention
Reliability Qualification results show that the projected data retention failure rate is much less
than 1 PPM over 20 years at 85°C or 100 years at 25°C.
ATtiny48/88
3.4Disclaimer
Typical values contained in this datasheet are based on simulations and characterization of
other AVR microcontrollers manufactured o n th e same proce ss te ch nolo gy. Min a nd Ma x valu es
will be available after the device is characterized.
8008AS–AVR–06/08
7
Loading...
+ 15 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.