Datasheet
ii
ATtiny13
2535E–AVR–10/04
Interrupt Vectors in ATtiny13 .............................................................................. 41
I/O Ports.............................................................................................. 42
Introduction......................................................................................................... 42
Ports as General Digital I/O ................................................................................ 43
Alternate Port Functions ..................................................................................... 47
Register Description for I/O-Ports....................................................................... 52
External Interrupts............................................................................. 53
Pin Change Interrupt Timing............................................................................... 53
External Interrupt registers ................................................................................. 54
8-bit Timer/Counter0 with PWM........................................................ 57
Overview............................................................................................................. 57
Timer/Counter Clock Sources............................................................................. 58
Counter Unit........................................................................................................ 58
Output Compare Unit.......................................................................................... 59
Compare Match Output Unit ............................................................................... 61
Modes of Operation ............................................................................................ 62
Timer/Counter Timing Diagrams......................................................................... 66
8-bit Timer/Counter Register Description ........................................................... 68
Timer/Counter Prescaler ................................................................... 74
Analog Comparator ........................................................................... 76
Analog Comparator Multiplexed Input ................................................................ 78
Analog to Digital Converter .............................................................. 79
Features.............................................................................................................. 79
Operation ............................................................................................................ 80
Starting a Conversion ......................................................................................... 81
Prescaling and Conversion Timing ..................................................................... 82
Changing Channel or Reference Selection ........................................................ 85
ADC Noise Canceler........................................................................................... 86
ADC Conversion Result...................................................................................... 90
debugWIRE On-chip Debug System ................................................ 95
Features.............................................................................................................. 95
Overview............................................................................................................. 95
Physical Interface ............................................................................................... 95
Software Break Points ........................................................................................ 96
Limitations of debugWIRE .................................................................................. 96
debugWIRE Related Register in I/O Memory ..................................................... 96
Self-Programming the Flash............................................................. 97
Addressing the Flash During Self-Programming ................................................ 98