Datasheet

18. I/O-Ports................................................................................................................ 107
18.1. Overview.................................................................................................................................. 107
18.2. Ports as General Digital I/O......................................................................................................108
18.3. Alternate Port Functions........................................................................................................... 111
18.4. Register Description................................................................................................................. 123
19. 8-bit Timer/Counter0 (TC0) with PWM.................................................................. 135
19.1. Features................................................................................................................................... 135
19.2. Overview.................................................................................................................................. 135
19.3. Timer/Counter Clock Sources.................................................................................................. 137
19.4. Counter Unit............................................................................................................................. 137
19.5. Output Compare Unit............................................................................................................... 138
19.6. Compare Match Output Unit.....................................................................................................140
19.7. Modes of Operation..................................................................................................................142
19.8. Timer/Counter Timing Diagrams.............................................................................................. 146
19.9. Register Description................................................................................................................. 148
20. 16-bit Timer/Counter1 (TC1) with PWM................................................................ 160
20.1. Overview.................................................................................................................................. 160
20.2. Features................................................................................................................................... 160
20.3. Block Diagram..........................................................................................................................160
20.4. Definitions.................................................................................................................................161
20.5. Registers.................................................................................................................................. 162
20.6. Accessing 16-bit Timer/Counter Registers...............................................................................162
20.7. Timer/Counter Clock Sources.................................................................................................. 165
20.8. Counter Unit............................................................................................................................. 165
20.9. Input Capture Unit.................................................................................................................... 166
20.10. Output Compare Units............................................................................................................. 168
20.11. Compare Match Output Unit.....................................................................................................170
20.12. Modes of Operation..................................................................................................................171
20.13. Timer/Counter 0, 1 Prescalers................................................................................................. 179
20.14. Timer/Counter Timing Diagrams.............................................................................................. 179
20.15. Register Description.................................................................................................................181
21. Timer/Counter 0, 1 Prescalers...............................................................................194
21.1. Internal Clock Source...............................................................................................................194
21.2. Prescaler Reset........................................................................................................................194
21.3. External Clock Source..............................................................................................................194
21.4. Register Description................................................................................................................. 196
22. 8-bit Timer/Counter2 (TC2) with PWM and Asynchronous Operation...................198
22.1. Features................................................................................................................................... 198
22.2. Overview.................................................................................................................................. 198
22.3. Timer/Counter Clock Sources.................................................................................................. 200
22.4. Counter Unit............................................................................................................................. 200
22.5. Output Compare Unit............................................................................................................... 201
22.6. Compare Match Output Unit.....................................................................................................203
ATmega48A/88A/168A
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002007A-page 5