Configuration Of 8-Bit Timer/Event Counters 50 And 51 - NEC 78K0/KD1 Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

7.2 Configuration of 8-Bit Timer/Event Counters 50 and 51

8-bit timer/event counters 50 and 51 consist of the following hardware.
Table 7-1. Configuration of 8-Bit Timer/Event Counters 50 and 51
Item
Timer register
Register
Timer output
Control registers
Note See Figure 4-10 Block Diagram of P16 and P17 and Figure 4-13 Block Diagram of P33.
(1) 8-bit timer counter 5n (TM5n)
TM5n is an 8-bit register that counts the count pulses and is read-only.
The counter is incremented in synchronization with the rising edge of the count clock.
When the count value is read during operation, count clock input is temporary stopped, and then the count value
is read. In the following situations, the count value is cleared to 00H.
<1> RESET input
<2> When TCE5n is cleared
<3> When TM5n and CR5n match in the mode in which clear & start occurs upon a match of the TM5n and
CR5n.
(2) 8-bit timer compare register 5n (CR5n)
CR5n can be read and written by an 8-bit memory manipulation instruction.
Except in PWM mode, the value set in CR5n is constantly compared with the 8-bit timer counter 5n (TM5n) count
value, and an interrupt request (INTTM5n) is generated if they match.
In PWM mode, when the TO5n pin becomes active due to a TM5n overflow and the values of TM5n and CR5n
match, the TO5n pin becomes inactive.
The value of CR5n can be set within 00H to FFH.
Cautions 1. In the mode in which clear & start occurs on a match of TM5n and CR5n (TMC5n6 = 0), do
not write other values to CR5n during operation.
2. In PWM mode, make the CR5n rewrite period 3 count clocks of the count clock (clock
selected by TCL5n) or more.
Remark n = 0, 1
164
CHAPTER 7 8-BIT TIMER/EVENT COUNTERS 50 AND 51
8-bit timer counter 5n (TM5n)
8-bit timer compare register 5n (CR5n)
1 (TO5n)
Timer clock selection register 5n (TCL5n)
8-bit timer mode control register 5n (TMC5n)
Port mode register 1 (PM1)
Preliminary User's Manual U16315EJ1V0UD
Configuration
Note
or port mode register 3 (PM3)
Note

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents