Enhanced Modular Input/Output Subsystem (eMIOS200)
PXN20 Microcontroller Reference Manual, Rev. 1
28-32 Freescale Semiconductor
Figure 28-27. Pulse/Edge Accumulation Continuous Mode Example
Figure 28-28. Pulse/Edge Accumulation Single-Shot Mode Example
28.4.1.1.8 Pulse/Edge Counting (PEC) Mode
The PEC mode returns the amount of pulses or edges detected on the input for a desired time window.
MODE[6] bit selects between continuous or single shot operation.
0xFFFFFF
0x000000
EMIOS_CCNTR[n]
1
Time
A1 Match
write to A1
Selected Counter Bus
0x000400
A1 Value
3
0x001500
0xxxxxxx
A2 Value
4
0x000400
0xxxxxxx
B1 Value
0x000090
0xxxxxxx
B2 Value
5
0x001000
0xxxxxxx
0x001500
0x000090
0x000090
0x007000
0x001500
0x007000
0x001000
FLAG Pin/Register
A1 Match
0x001500
Input Signal
2
0x001000
A1 events
A1 events
no events
events
0x000400
Notes:
4. EMIOS_CADR[n] = A2 (when reading)
5. EMIOS_CBDR[n] = B1
3. EMIOS_CADR[n] = A1 (when writing)
2. After input filter
1. Cleared on the first input event after writing to register A1
0x007000
MODE
= 000_10000
0xFFFFFF
0x000000
EMIOS_CCNTR[n]
1
Time
write to A1
Selected Counter Bus
0x000400
A1 Value
3
0x001500
0xxxxxxx
A2 Value
4
0x000400
0xxxxxxx
B1 Value
0x000090
0xxxxxxx
B2 Value
5
0xxxxxxx
0x001500
0x000090
0x000090
FLAG Pin/Register
0x001500
Input Signal
2
A1 events
Notes:
4. EMIOS_CADR[n] = A2 (when reading)
5. EMIOS_CBDR[n] = B1
3. EMIOS_CADR[n] = A1 (when writing)
2. After input filter
events
events
0x000400
1. Cleared on the first input event after writing to register A1
A1 Match
MODE
= 000_10001