![Freescale Semiconductor MPC5553 Скачать руководство пользователя страница 674](http://html1.mh-extra.com/html/freescale-semiconductor/mpc5553/mpc5553_reference-manual_2330655674.webp)
MPC5553/MPC5554 Microcontroller Reference Manual, Rev. 5
Freescale Semiconductor
17-35
Figure 17-23. Pulse/Edge Accumulation Single-shot Mode Example
17.4.4.4.8
Pulse/Edge Counting Mode (PEC)
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.
Triggering of the internal counter is done by a rising or falling edge or both edges on the input signal. The
polarity and the triggering edge is selected by EDSEL and EDPOL bits in EMIOS_CCR
n
.
Register A1 holds the start time and register B1 holds the stop time for the time window. After writing to
register A1, when a match occur between comparator A and the selected timebase, the internal counter is
cleared and it is ready to start counting input events. When the time base matches comparator B1, the
internal counter is disabled and the FLAG bit is set. Reading the EMIOS_CCNTR
n
returns the amount of
detected pulses.
For continuous operation (MODE[6] cleared), the next match between comparator A and the selected time
base clears the internal counter and counting is enabled again. In order to guarantee the accuracy when
Table 17-21. Mode of Operation: PEC Mode
MODE[0:6]
Unified Channel Mode of Operation
0b0001010
Pulse/edge counting (continuous)
0b0001011
Pulse/edge counting (single shot)
Selected
Counter Bus
0x000090
0x000400
Input Signal
2
A2 Value
4
0x001500
0xxxxxxx 0x000400
0xxxxxxx
0x000090
0xFFFFFF
0x001500
EMIOS_CCNTR
n
1
FLAG
Set Event
MODE[6] = 1
Write to A1
A1 Match
A1 Value
3
B1 Value
0xxxxxxx 0x000090
B2 Value
5
0x000400
Time
Events
A1 Events
0x000000
0xxxxxxx 0x001500
Events
Notes:
1
Cleared on the first input event after writing to register A1.
2
After input filter.
3
Writing EMIOS_CADR
n
writes to
A1.
4
Reading EMIOS_CADR
n
returns the value of
A2 .
5
Reading EMIOS_CBDR
n
returns the value of
B1.
Содержание MPC5553
Страница 5: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 2 Freescale Semiconductor...
Страница 21: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 xvi Freescale Semiconductor...
Страница 47: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 1 26 Freescale Semiconductor...
Страница 163: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 4 20 Freescale Semiconductor...
Страница 179: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 5 16 Freescale Semiconductor...
Страница 561: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 13 38 Freescale Semiconductor...
Страница 615: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 14 54 Freescale Semiconductor...
Страница 707: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 17 68 Freescale Semiconductor...
Страница 755: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 18 48 Freescale Semiconductor...
Страница 873: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 19 118 Freescale Semiconductor...
Страница 984: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 Freescale Semiconductor 21 41...
Страница 985: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 21 42 Freescale Semiconductor...
Страница 1019: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 22 34 Freescale Semiconductor...
Страница 1129: ...MPC5553 MPC5554 Microcontroller Reference Manual Rev 5 25 90 Freescale Semiconductor...
Страница 1207: ...Revision History 4 Freescale Semiconductor...