| Motore di ricerca datesheet componenti elettronici |
|
ATtiny261-ESSZ Scheda tecnica(PDF) 76 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
ATtiny261-ESSZ Scheda tecnica(HTML) 76 Page - ATMEL Corporation |
|
76 / 227 page ![]() 76 7753C–AVR–07/09 ATtiny261/ATtiny461/ATtiny861 Figure 14-2. CTC Mode, Timing Diagram An interrupt can be generated each time the counter value reaches the TOP value by using the OCF0A Flag. If the interrupt is enabled, the interrupt handler routine can be used for updating the TOP value. However, changing TOP to a value close to BOTTOM when the counter is run- ning with none or a low prescaler value must be done with care since the CTC mode does not have the double buffering feature. If the new value written to OCR0A is lower than the current value of TCNT0, the counter will miss the Compare Match. The counter will then have to count to its maximum value (0xFF) and wrap around starting at 0x00 before the Compare Match can occur. As for the Normal mode of operation, the TOV0 Flag is set in the same timer clock cycle that the counter counts from MAX to 0x00. 14.5.3 16-bit Mode In 16-bit mode, see Table 14-3 on page 75, the counter (TCNT0H/L) is a incrementing until it overruns when it passes its maximum 16-bit value (MAX = 0xFFFF) and then restarts from the bottom (0x0000). The Overflow Flag (TOV0) will be set in the same timer clock cycle as the TCNT0H/L becomes zero. The TOV0 Flag in this case behaves like a 17th bit, except that it is only set, not cleared. However, combined with the timer overflow interrupt that automatically clears the TOV0 Flag, the timer resolution can be increased by software. There are no special cases to consider in the Normal mode, a new counter value can be written anytime. The Output Compare Unit can be used to generate interrupts at some given time. 14.5.4 8-bit Input Capture Mode The Timer/Counter0 can also be used in an 8-bit Input Capture mode, see Table 14-3 on page 75 for bit settings. For full description, see the section “Input Capture Unit” on page 77. 14.5.5 16-bit Input Capture Mode The Timer/Counter0 can also be used in a 16-bit Input Capture mode, see Table 14-3 on page 75 for bit settings. For full description, see the section “Input Capture Unit” on page 77. TCNTn OCnx Interrupt Flag Set 1 4 Period 2 3 |
|
Link URL |
| Lei ha avuto il aiuto da alldatasheet? [ DONATE ] |
Di alldatasheet | Richest di pubblicita | contatti | Privacy Policy | Collegamento alla scheda tecnica | scambio Link | Ricerca produttore All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |