NEC PD78P214 Manuale Utente

Pagina di 487
219
Chapter 7   Timer/Counter Units
7
(14) With an in-circuit emulator, digital noise cannot be removed correctly.  When a timer/counter is used together
with edge detection function, note the point below.
(a) When IE-78210-R is used
Operations are performed on an erroneously detected edge.
(b) When other in-circuit emulators are used
• Timer/counter capture operation and clear operation
An erroneously detected edge has no effect.  Accordingly, even if an interrupt is generated by an
erroneously detected edge, the capture value is not updated.  Particularly, note that the value of CR22
after being read is undefined.
• Timer/counter compare operation
If a mode is set which performs a clear operation after a capture operation, an erroneously detected
edge changes the timing of coincidence-based interrupt generation.  As the result, an interrupt is
repeatedly generated at a time when the value of the timer/counter does not coincide with the value
of the compare register.  Normal coincidence-based interrupt generation is resumed when a normal
edge is applied or the timer/counter is stopped.  Timer output is not affected by an erroneously detected
edge, but is performed with the normal timing.
For details of erroneous edge detection, see Section 11.4.
When using an in-circuit emulator, see also Section 7.5.4.
7.5.2  Notes on 16-Bit Timer/Counter
Before compare operation can be performed with the 16-bit timer/counter, an appropriate value must be written
into a compare register to be used.
7.5.3  Notes on 8-Bit Timer/Counter 2
(1) When 8-bit timer/counter 2 is used as an external event counter, the increment of TM2 lags the input of a valid
edge to the CI pin by a maximum of 28 system clock pulses (4.67 
µs: f
CLK
 = 6 MHz).  This means that TM2 may
not be incremented when read immediately after an edge is detected.  In addition, the generation of an
interrupt request by a coincidence with a compare register (CR20, CR21) lags the input of an edge.  Take this
point into consideration when fine timing control is required.