Samsung S3C80A5B User Manual page 225

8-bit cmos
Table of Contents

Advertisement

BASIC TIMER and TIMER 0
F
PROGRAMMING TIP — Programming Timer 0 (Continued)
T0INT
PUSH
SRP0
INC
ADD
ADC
ADC
CP
R0,#32H
JR
BITS
NO_200MS_SET:
LD
POP
T0OVER
IRET
10-10
RP0
#60H
R0
R2,R0
R3,R2
R4,R0
ULT,NO_200MS_SET
R1.2
T0CON,#42H
RP0
; Save RP0 to stack
; RP0 ← 60H
; R0 ← R0 + 1
; R2 ← R2 + R0
; R3 ← R3 + R2 + Carry
; R4 ← R4 + R0 + Carry
; 50 × 4 = 200 ms
; Bit setting (61.2H)
; Clear pending bit
; Restore register pointer 0 value
; Return from interrupt service routine
S3C80A5B

Advertisement

Table of Contents
loading

Table of Contents