TIMERS and TIMER/COUNTERS
+ +
PROGRAMMING TIP — Using the Watch Timer
1. Select a subsystem clock as the LCD display clock, a 0.5 second interrupt, and 2 kHz buzzer enable:
BITS
SMB
LD
LD
BITR
LD
LD
BITS
2. Sample real-time clock processing method:
CLOCK
BTSTZ
RET
•
•
•
11-26
EMB
15
EA,#04H
PMG2,EA
; P2.3
P2.3
EA,#85H
WMOD,EA
IEW
IRQW
; 0.5 second check
; No, return
; Yes, 0.5 second interrupt generation
; Increment HOUR, MINUTE, SECOND
KS57C2308/P2308/C2316/P2316
output mode