Cautions For 16-Bit Timer/Event Counters 00 And 01; Start Timing Of 16-Bit Timer Counter 0N (Tm0N) - NEC 78K0 User Manual

8-bit single-chip microcontrollers
Hide thumbs Also See for 78K0:
Table of Contents

Advertisement

7.5

Cautions for 16-Bit Timer/Event Counters 00 and 01

(1) Timer start errors
An error of up to one clock may occur in the time required for a match signal to be generated after timer start.
This is because 16-bit timer counter 0n (TM0n) is started asynchronously to the count clock.
Count clock
TM0n count value
(2) 16-bit timer capture/compare register setting (in the mode in which clear & start occurs on match
between TM0n and CR00n)
Set 16-bit timer capture/compare registers 00n and 01n (CR00n and CR01n) to other than 0000H. This means a
1-pulse count operation cannot be performed when 16-bit timer/event counter 0n is used as an event counter.
(3) Capture register data retention timing
The values of 16-bit timer capture/compare registers 00n and 01n (CR00n and CR01n) are not guaranteed after
16-bit timer/event counter 0n has been stopped.
(4) Valid edge setting
Set the valid edge of the TI00n pin after clearing bits 2 and 3 (TMC0n2 and TMC0n3) of 16-bit timer mode control
register 0n (TMC0n) to 0, 0, respectively, and then stopping timer operation. The valid edge is set using bits 4
and 5 (ES0n0 and ES0n1) of prescaler mode register 0n (PRM0n).
(5) Re-triggering one-shot pulse
(a) One-shot pulse output by software
When a one-shot pulse is output, do not set the OSPT0n bit to 1. Do not output the one-shot pulse again
until INTTM00n, which occurs upon a match with the CR00n register, or INTTM01n, which occurs upon a
match with the CR01n register, occurs.
(b) One-shot pulse output with external trigger
If the external trigger occurs again while a one-shot pulse is output, it is ignored.
(c) One-shot pulse output function
When using the one-shot pulse output of 16-bit timer/event counter 0n with a software trigger, do not change
the level of the TI00n pin or its alternate function port pin.
Because the external trigger is valid even in this case, the timer is cleared and started even at the level of the
TI00n pin or its alternate function port pin, resulting in the output of a pulse at an undesired timing.
Remark n = 0:
n = 0, 1:
CHAPTER 7 16-BIT TIMER/EVENT COUNTERS 00 AND 01
Figure 7-40. Start Timing of 16-Bit Timer Counter 0n (TM0n)
0000H
Timer start
µ
PD780143, 780144
µ
PD780146, 780148, 78F0148
User's Manual U15947EJ2V0UD
0001H
0002H
0003H
*
0004H
209

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

78kf1

Table of Contents