Specifications
S1C62N82 TECHNICAL SOFTWARE EPSON II-41
CHAPTER 3: PERIPHERAL CIRCUITS (Timer)
• Initializing the timer
Label Mnemonic/operand Comment
LD Y,0F9H ;Set address of the timer
;reset register
OR MY,0100B ;Reset the timer
The two instruction steps above are used to reset (clear
TM0–TM3 to 0) and restart the timer. The TMRST register is
cleared to "0" by hardware 1 clock after it is set to "1".
• Loading the timer
Label Mnemonic/operand Comment
LD Y,0E4H ;Set address of
;the timer data (TM0 to TM3)
LD A,MY ;Load the data of
;TM0 to TM3 into A register
As shown in Table 3.7.2, the two instruction steps load the
data of TM0 to TM3 into the A register.
TM3 (2 Hz)
D3
TM2 (4 Hz)
D2
TM1 (8 Hz)
D1
TM0 (16 Hz)
D0
A register
Table 3.7.2
Loading the timer data
Examples of timer
control program