English
Language : 

3804H_M Datasheet, PDF (158/387 Pages) Renesas Technology Corp – 8-BIT CISC SINGLE-CHIP MICROCOMPUTER 740 FAMILY / 38000 SERIES
3804 Group (Spec.H)
APPLICATION
2.3 Timer
RESET
q x: This bit is not used here. Set it to “0” or “1” arbitrarily.
Initialization
SEI
TM (address 002316)
XXXX1X002
IREQ1 (address 003C16), bit4 0
ICON1 (address 003E16), bit4 1
•All interrupts disabled
•Timer X : Timer mode
•Clear Timer X interrupt request bit
•Timer X interrupt enabled
T12XCSS (address 000E16)
PREX (address 002416)
TX
(address 002516)
0011XXXX2
256 – 1
256 – 1
TM (address 002316),
0
bit3
CLI
•Timer X count source : f(XIN)/16
•Set “division ratio – 1” to Prescaler X and Timer X
•Timer X count start
•Interrupts enabled
Main processing
<Procedure for completion of clock set>
(Note 1)
PREX (address 002416)
TX (address 002516)
IREQ1 (address 003C16), bit4
256 – 1
256 – 1
0
•Reset Timer to restart count from 0 second after completion
of clock set
Note 1: Perform procedure for completion of clock set only
when completing clock set.
Timer X interrupt process routine
CLT (Note 2)
CLD (Note 3)
Push registers to stack
Note 2: When using Index X mode flag (T)
Note 3: When using Decimal mode flag (D)
•Push registers used in interrupt process routine
Clock stop ?
N
Clock count up (1/4 second to year)
Y •Judge whether clock stops
•Clock count up
Pop registers
RTI
•Pop registers pushed to stack
Fig. 2.3.17 Control procedure
Rev.1.00 Jan 14, 2005
REJ09B0212-0100Z
2-34