Page
34
Regardless of which other options are selected, Timer 2 can operate in Timer or Counter mode If
Source
is set to Timer, Timer 2 increments from the system clock. If it is set to Counter, it
increments on either rising or falling edge (set by
Edge
) on T2 pin (pin32 - PD7).
A
prescaler
can be applied to increase overflow time in timer mode.
PWM Enable
This enables Pulse Width Modulation mode for this Timer. The resolution is set to 8-bit. So the
timer counts from $00 to $FF and down to $00. The match value is set in the
Compare Value
Field. When the Timer value matches the value set in the Compare Value field (which will occur
twice every cycle - on upcount and downcount), the output action that results on PWM2 (pin 17 -
PB7)) can be set by the
Output Action
radio buttons :
Disconnected - No effect on output pin
Non-inverted - Cleared on upcount, set on downcount
Inverted - Set on upcount, cleared on downcount
Output Compare
The value of Timer 0 is compared with the value set in the
Compare Value
Field. When a match
is detected, the effect on the output pin (OC2 - pin 17 - PB7) is set by the
Output
radio buttons.
If the Clear Timer box is checked, the timer is reset to $00 in the CPU clock cycle after a match.
The output can be configured as illustrated.
Содержание STK300
Страница 1: ...Page 1 STK300 USER MANUAL Published by KANDA SYSTEMS LTD www kanda com...
Страница 33: ...Page 33 Timer 2 Window Timer 2 is an 8 bit Timer Counter Standard Operation...
Страница 42: ...Page 42 Port F Window Port F is input only Any bits not used by the ADC can be used for standard input...
Страница 45: ...Page 45...