![Atmel AT90S8414 Скачать руководство пользователя страница 35](http://html1.mh-extra.com/html/atmel/at90s8414/at90s8414_manual_3003427035.webp)
AT90S8414
Preliminary
4-35
THE TIMER/COUNTER0 CONTROL REGISTER - TCCR0
Bit
7
6
5
4
3
2
1
0
$33
-
-
COM01
COM00
CTC0
CS02
CS01
CS00
TCCR0
Read/Write
R
R
R/W
R/W
R/W
R/W
R/W
R/W
Initial value
0
0
0
0
0
0
0
0
Bits 7,6 - Res : Reserved bits:
These bits are reserved bits in the AT90S8414 and always read zero.
Bits 5,4 - COM01, COM00 : Compare Output Mode0, bit 1 and 0:
The COM01 and COM00 control bits determine any output pin action following a compare match in Timer/Counter0.
Any output pin actions are effective on pin OC0 - Output Compare pin 0. Since this is an alternative function to an I/O
port, the corresponding data direction control bit must be set (one) to control an output pin. The control configuration is
defined in the following table:
Table 6: Compare 0 Mode Select
COM01
COM00
Description
0
0
Timer/Counter0 disconnected from output pin OC0.
0
1
Toggle the OC0 output line.
1
0
Clear the OC0 output line (to zero).
1
1
Set the OC0 output line (to one).
Note: When changing the COM01/COM00 bits, Output Compare Interrupt 0 must be disabled by clearing its Interrupt
Enable bit in the TIMSK Register. Otherwise an interrupt can occur when the bits are changed.
Bit 3 - CTC0 : Clear Timer/Counter0 on Compare match:
When the CTC0 control bit is set (one), the Timer/Counter0 is reset to $00 in the clock cycle after the compare match. If
the CTC0 control bit is cleared, the Timer/Counter0 continues running freely until it is stopped, set, cleared or wraps
around (overflow)
.
Bits 2,1,0 - CS02, CS01, CS00 : Clock Select0, bit 2,1 and 0:
The Clock Select0 bits 2,1 and 0 define the prescaling source of Timer0.
Table 7: Clock 0 Prescale Select
CS02
CS01
CS00
Description
0
0
0
Stop, the Timer/Counter0 is stopped.
0
0
1
CK
0
1
0
CK / 8
0
1
1
CK / 64
1
0
0
CK / 256
1
0
1
CK / 1024
1
1
0
External Pin T0, rising edge
1
1
1
External Pin T0, falling edge
The Stop condition provides a Timer Enable/Disable function. The CK down divided modes are scaled directly from the
CK oscillator clock. If the external pin modes are used, the corresponding setup must be performed in the actual data
direction control register (cleared to zero gives an input pin).
Bits 5..3 - Res : Reserved bits:
Содержание AT90S8414
Страница 4: ...4 4 AT90S8414 Preliminary...
Страница 6: ...4 6 AT90S8414 Preliminary Block Diagram Figure 1 The AT90S8414 Block Diagram...
Страница 65: ...AT90S8414 Preliminary 4 65 Figure 50 PORTB Schematic Diagram Pin PB5 Figure 51 PORTB Schematic Diagram Pin PB6...
Страница 68: ...4 68 AT90S8414 Preliminary Figure 53 PORTC Schematic Diagram Pins PC0 PC7...
Страница 87: ...AT90S8414 Preliminary 4 87...