Datasheet
17.2. Register Description................................................................................................................... 99
18. I/O-Ports................................................................................................................ 108
18.1. Overview.................................................................................................................................. 108
18.2. Ports as General Digital I/O......................................................................................................109
18.3. Alternate Port Functions........................................................................................................... 112
18.4. Register Description................................................................................................................. 124
19. 8-bit Timer/Counter0 (TC0) with PWM.................................................................. 136
19.1. Features................................................................................................................................... 136
19.2. Overview.................................................................................................................................. 136
19.3. Timer/Counter Clock Sources.................................................................................................. 138
19.4. Counter Unit............................................................................................................................. 138
19.5. Output Compare Unit............................................................................................................... 139
19.6. Compare Match Output Unit.....................................................................................................141
19.7. Modes of Operation..................................................................................................................143
19.8. Timer/Counter Timing Diagrams.............................................................................................. 147
19.9. Register Description................................................................................................................. 149
20. 16-bit Timer/Counter1 (TC1) with PWM................................................................ 161
20.1. Overview.................................................................................................................................. 161
20.2. Features................................................................................................................................... 161
20.3. Block Diagram..........................................................................................................................161
20.4. Definitions.................................................................................................................................162
20.5. Registers.................................................................................................................................. 163
20.6. Accessing 16-bit Timer/Counter Registers...............................................................................163
20.7. Timer/Counter Clock Sources.................................................................................................. 166
20.8. Counter Unit............................................................................................................................. 166
20.9. Input Capture Unit.................................................................................................................... 167
20.10. Output Compare Units............................................................................................................. 169
20.11. Compare Match Output Unit.....................................................................................................171
20.12. Modes of Operation..................................................................................................................172
20.13. Timer/Counter 0, 1 Prescalers................................................................................................. 180
20.14. Timer/Counter Timing Diagrams.............................................................................................. 180
20.15. Register Description.................................................................................................................182
21. Timer/Counter 0, 1 Prescalers...............................................................................195
21.1. Internal Clock Source...............................................................................................................195
21.2. Prescaler Reset........................................................................................................................195
21.3. External Clock Source..............................................................................................................195
21.4. Register Description................................................................................................................. 197
22. 8-bit Timer/Counter2 (TC2) with PWM and Asynchronous Operation...................199
22.1. Features................................................................................................................................... 199
22.2. Overview.................................................................................................................................. 199
22.3. Timer/Counter Clock Sources.................................................................................................. 201
22.4. Counter Unit............................................................................................................................. 201
22.5. Output Compare Unit............................................................................................................... 202
ATmega48PA/88PA/168PA
© 2018 Microchip Technology Inc.
Datasheet Complete
DS40002011A-page 5