NJU3503
• TIMER1 / PRESCALER CONTROL REGISTER { PHY3 ; (Y'=3, Peripheral register table 0) }
[ Writing to the Timer1 / Prescaler Control Register ]
(MSB) 3
2
1
0 (LSB)
PHY3
−
Start control
/ 1:Start
Operation mode / 0:Single mode, 1:Repeat mode
Prescaler control / 0:On, 1:Off
EX.) An example of the start procedure in the single mode and the internal clock operation.
:
:
SRPC
LDI Y,3
LDI A,%0000
TAP
LDI A,%0001
TAP
:
:
;
;PHY3(Timer1/Prescaler Control Register) is pointed.
;"0000"(BIN) is stored to accumulator
;Data is transferred from accumulator to PHY3
;"0001"(BIN) is stored to accumulator
;Data is transferred from accumulator to PHY3
Single mode,
Prescaler is enable
The count is started.
Remarks) When the prescaler generating the internal count clock is stopped the operation, Timer is also stopped.
But the data in the counter is kept. Therefore Timer can continue to count from the kept condition of
the counter when the prescaler is started the operation again. However, the clocks from the prescaler
are delivered to Serial I/O, CKOUT terminal and A/D converter controller, therefore the prescaler
requires careful operation, especially stop or start.
When the prescaler is started the operation again after it was stopped, it is reset and start to count from
“zero”.
[ Reading from the Timer1 / Prescaler Control Register ]
(MSB) 3
2
1
0 (LSB)
PHY3 “0”
Overflow flag
/ 1:Overflow
Operation mode / 0:Single mode, 1:Repeat mode
Prescaler control / 0:On, 1:Off
EX.) An example of the overflow in the single mode and the internal clock operation.(The data of the Timer1 /
Prescaler Control Register is "0001"(BIN).)
:
:
SRPC
LDI Y,3
TPA
:
:
;
;PHY3(Timer1/Prescaler Control Register) is pointed.
;"0001"(BIN) of PHY3 is transferred to accumulator.
- 23 -