KS57C2308/P2308/C2316/P2316
TIMERS and TIMER/COUNTERS
11-21
+
+
PROGRAMMING TIP — Setting a TC0 Timer Interval
To set a 30 ms timer interval for TC0, given fxx = 4.19 MHz, follow these steps.
1.
Select the timer/counter 0 mode register with a maximum setup time of 62.5 ms (assume the TC0 counter
clock = fxx/2
10
, and TREF0 is set to FFH):
2.
Calculate the TREF0 value:
30 ms =
TREF0 value + 1
4.09 kHz
TREF0 + 1 =
30 ms
244 µs
= 122.9 = 7AH
TREF0 value = 7AH – 1 = 79H
3.
Load the value 79H to the TREF0 register:
BITS
EMB
SMB
15
LD
EA,#79H
LD
TREF0,EA
LD
EA,#4CH
LD
TMOD0,EA
Содержание C2316
Страница 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Страница 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Страница 170: ......
Страница 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Страница 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Страница 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Страница 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Страница 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Страница 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Страница 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Страница 318: ......
Страница 320: ......
Страница 322: ......
Страница 325: ......
Страница 327: ......