Datasheet

Table Of Contents
Section 15 Asynchronous Event Counter (AEC)
Rev. 2.00 Jul. 04, 2007 Page 331 of 692
REJ09B0309-0200
Note: Ndr and Ncm above must be set so that Ndr < Ncm. If the settings do not satisfy this
condition, the output of the event counter PWM is fixed low.
Table 15.2 Examples of Event Counter PWM Operation
Conditions: fosc = 4 MHz, fφ = 4 MHz, high-speed active mode, ECPWCR value (Ncm) =
H'7A11, ECPWDR value (Ndr) = H'16E3
Clock
Source
Selection
Clock
Source
Cycle (T)*
ECPWCR
Value (Ncm)
ECPWDR
Value (Ndr)
toff = T ×
(Ndr + 1)
tcm = T ×
(Ncm + 1)
ton = tcm –
toff
φ/2 0.5 µs 2.93 ms 15.625 ms 12.695 ms
φ/4 1 µs 5.86 ms 31.25 ms 25.39 ms
φ/8 2 µs 11.72 ms 62.5 ms 50.78 ms
φ/16 4 µs 23.44 ms 125.0 ms 101.56 ms
φ/32 8 µs 46.88 ms 250.0 ms 203.12 ms
φ/64 16 µs
H'7A11
D'31249
H'16E3
D'5859
93.76 ms 500.0 ms 406.24 ms
Note: * toff minimum width
15.4.5 Operation of Clock Input Enable/Disable Function
The clock input to the event counter can be controlled by the IRQAEC pin when ECPWME in
AEGSR is 0, and by the event counter PWM output, IECPWM when ECPWME in AEGSR is 1.
As this function forcibly terminates the clock input by each signal, a maximum error of one count
will occur depending on the IRQAEC or IECPWM timing. Figure 15.5 shows an example of the
operation.
Clock stopped
N+2 N+3 N+4 N+5 N+6N N+1
Edge generated by clock return
Input event
IRQAEC or IECPWM
Actually counted clock source
Counter value
Figure 15.5 Example of Clock Control Operation