CHAPTER 7 TIMER/COUNTER FUNCTION
User’s Manual U13850EJ6V0UD
234
7.3 8-Bit Timer (TM2 to TM7)
7.3.1 Outline
•
8-bit compare registers: 8 (CRn0)
Can be used as 16-bit compare registers by connecting in cascade (2 max.).
•
Compare match/overflow interrupt request signal (INTTMn) output enabled
•
Event input (TIm) count enabled
•
Timer outputs that operate on match detection: 1 each (TOm)
If using the P26/TI2/TO2, P27/TI3/TO3, P36/TI4/TO4, and P37/TI5/TO5 pins as the TO2 to TO5 pins (timer
outputs), set the value of ports 2 and 3 (P2, P3) to 0 (low-level output) and the value of the port 2 and 3 mode
registers (PM2, PM3) to 0 (port output mode). The logical sum (OR) of the output value of the port and the timer
is output. Since the TOn pin and TIn pin share a pin, one or other of these functions (but not both) can be used.
Remark
n = 2 to 7,
m = 2 to 5
7.3.2 Functions
8-bit timer n has the following two modes (n = 2 to 7).
• Mode using timer alone (individual mode)
• Mode using cascade connection (16-bit resolution: cascade connection mode)
Caution
Do not access following registers when not using the cascade connection.
•
16-bit counters (TM23, TM45, TM67)
•
16-bit compare registers (CR23, CR45, CR67)
The two modes are described next.
(1) Mode using timer alone (individual mode)
The timer operates as an 8-bit timer/event counter.
It can have the following functions.
• Interval timer
• External event counter
• Square wave output
• PWM output
(2) Mode using cascade connection (16-bit resolution: cascade connection mode)
The timer operates as a 16-bit timer/event counter by connecting TM2 and TM3 or TM4 and TM5 in cascade.
It can have the following functions.
• Interval timer with 16-bit resolution
• External event counter with 16-bit resolution
• Square wave output with 16-bit resolution
The timer operates as a 16-bit timer/event counter by connecting TM6 and TM7 in cascade.
• Interval timer with 16-bit resolution
Содержание V850/SB1
Страница 2: ...User s Manual U13850EJ6V0UD 2 MEMO ...