CHAPTER 9 TIMER/COUNTER FUNCTION
213
User’s Manual U15195EJ5V0UD
(4) Timer output mode registers 0, 1 (TOMR0, TOMR1)
The TOMRn register controls timer output from the TO0n0 to TO0n5 pins.
To prevent abnormal output from the TO0n0 to TO0n5 pins due to illegal access, data is written to the
TOMRn register in the following two sequences.
(a) Write access to the TOMR write enable register (SPECn), followed by
(b) Write access to the TOMRn register
Write is not enabled via hardware unless these two sequences are implemented.
TOMRn can be read/written in 8-bit units.
Caution When interrupt requests are generated during write access to the TOMRn register (after
write access to the SPECn register and prior to writing to the TOMRn register), write
processing to the TOMRn register may not be performed normally if access to other
addresses is performed using the internal bus during servicing of these interrupts. Add
one of the following processing items during the TOMRn register write routine.
•
Prior to write access to the TOMRn register, disable acknowledgment of all interrupts of
the CPU.
•
Following write access to the TOMRn register, check that write was performed normally.
(1/2)
7
ALVTO
TOMR0
6
ALVUB
5
ALVVB
4
ALVWB
3
TOSP
2
0
1
TOEDG1
0
TOEDG0
Address
FFFFF57DH
After reset
00H
7
ALVTO
TOMR1
6
ALVUB
5
ALVVB
4
ALVWB
3
TOSP
2
0
1
TOEDG1
0
TOEDG0
Address
FFFFF5BDH
After reset
00H
Bit position
Bit name
Function
7
ALVTO
Specifies the active level of the TO0n0, TO0n2, and TO0n4 pins.
0: Active level is low level
1: Active level is high level
Caution Changing the ALVTO bit during TM0n operation (TM0CEn = 1) is
prohibited.
6
ALVUB
Specifies the output level of the TO0n1 pin.
0: Inverted level of active level set by ALVTO bit
1: Active level set by ALVTO bit
When ALVUB = 1, the output level of TO0n1 output is the same as TO0n0.
Caution Changing the ALVUB bit during TM0n operation (TM0CEn = 1) is
prohibited.
Remark
n = 0, 1
Содержание PD703114
Страница 2: ...2 User s Manual U15195EJ5V0UD MEMO ...