TIMERS and TIMER/COUNTERS KS57C2308/P2308/C2316/P2316
11-18
Table 11-7. TMOD0.6, TMOD0.5, and TMOD0.4 Bit Settings
TMOD0.6 TMOD0.5 TMOD0.4 Resulting Counter Source and Clock Frequency
000External clock input (TCL0) on rising edges
001External clock input (TCL0) on falling edges
100fxx/210 (4.09 kHz)
101fxx /28 (16.4 kHz)
110fxx/26 (65.5 kHz)
111fxx/24 (262 kHz)
NOTE:fxx = selected system clock of 4.19 MHz.
++ PROGRAMMING TIP — Restarting TC0 Counting Operation
1. Set TC0 timer interval to 4.09 kHz:
BITS EMB
SMB 15
LD EA,#4CH
LDTMOD0,EA
EI
BITS IET0
2. Clear TCNT0, IRQT0, and TOL0 and restart TC0 counting operation:
BITS EMB
SMB 15
BITS TMOD0.3