NEC 78014Y Series User Manual page 177

8-bit single-chip microcontrollers
Table of Contents

Advertisement

(1) 16-bit compare register (CR00)
CR00 is a 16-bit register for which the value set in the CR00 is constantly compared with the 16-bit timer register
(TM0) count value, and an interrupt request (INTTM0) is generated if they match.
It can be used as the register which holds the interval time when TM0 is set to interval timer operation, and as
the register which sets the pulse width when TM0 is set PWM output operation.
CR00 is set by a 16-bit memory manipulation instruction. The value of 0001H to FFFFH can be set.
After RESET input, the value of CR00 is undefined.
Cautions 1. PWM data (14 bits) must be set in the upper 14 bits of CR00. The lower 2 bits must be set to
(2) 16-bit capture register (CR01)
CR01 is a 16-bit register capturing the content of 16-bit timer register (TM0).
Capture trigger is INTP0/P001/TI0 pin valid edge input. Setting of the INTP0 valid edge is done with the external
interrupt mode register (INTM0).
CR01 is read by a 16-bit memory manipulation instruction.
After RESET input, the value of CR01 is undefined.
www.DataSheet4U.com
Caution
(3) 16-bit timer register (TM0)
TM0 is a 16-bit register counting count pulse.
TM0 is read by a 16-bit memory manipulation instruction.
After RESET input, the value of TM0 is 0000H.
Caution
CHAPTER 8 16-BIT TIMER/EVENT COUNTER
00.
2. CR00 must be set in a value other than 0000H. Consequently, when it is used as an event
counter, 1-pulse count operation is prohibited.
3. When the value of CR00 posterior to alteration is less than the value of the 16-bit timer register
(TM0), TM0 keeps on counting and resumes counting from 0 after an overflow. When the value
of CR00 posterior to alteration is less than the value prior to alteration, the timer must be
restarted after CR00 is altered.
When the TI0/P00 pin's valid edge is input while CR01 is read, CR01 retains its contents without
doing capture operations. However, the interrupt request flag (PIF0) is set due to the valid edge
detection.
The TM0 value is read out via CR01, resulting in changing the previous CR01 contents.
177

Advertisement

Table of Contents
loading

Table of Contents