
158
μPD780948, μPD78F0948, μPD780949, μPD78F0949
8.2 16-Bit Timer 2 Configuration
Timer 2 consists of the following hardware.
Table 8-1: Timer 2 Configuration
(1) 16-bit timer register (TM2)
TM2 is a 16-bit read-only register that counts count pulses.
The counter is incremented in synchronization with the rising edge of an input clock. If the count
value is read during operation, input of the count clock is temporarily stopped, and the count value
at that point is read. The count value is reset to 0000H in the following cases:
<1>
<2>
At RESET input
If TMC22 is cleared
(2) Capture register 20 (CR20)
The valid edge of the TI20/P30 pin can be selected as the capture trigger. Setting of the TI20 valid
edge is performed by setting of the prescaler mode register (PRM2). When the valid edge of the
TI20 is detected, an interrupt request (INTTM20) is generated.
CR20 is read by a 16-bit memory manipulation instruction.
After RESET input, the value of CR20 is undefined.
(3) Capture register 21 (CR21)
The valid edge of the TI21/P31 pin can be selected as the capture trigger. Setting of the TI21 valid
edge is performed by setting of the prescaler mode register (PRM2). When the valid edge of the
TI21 is detected, an interrupt request (INTTM21) is generated.
CR21 is read by a 16-bit memory manipulation instruction.
After RESET input, the value of CR21 is undefined.
(4) Capture register 22 (CR22)
The valid edge of the TI22/P32 pin can be selected as the capture trigger. Setting of the TI22 valid
edge is performed by setting of the prescaler mode register (PRM2). When the valid edge of the
TI22 is detected, an interrupt request (INTTM22) is generated.
CR22 is read by a 16-bit memory manipulation instruction.
After RESET input, the value of CR22 is undefined.
Item
Configuration
Timer register
Register
16 bits x 1 (TM2)
Capture register: 16 bits x 3 (CR20 to CR22)
16 bit timer mode control register (TMC2)
Capture pulse control register (CRC2)
Prescaler mode register (PRM2)
Control register