Modular Input/Output Subsystem (MIOS14)
MPC561/MPC563 Reference Manual, Rev. 1.2
Freescale Semiconductor
17-33
Figure 17-18. MDASM Input Capture Example
17.9.3.5
Output Compare (OCB and OCAB) Modes
Output compare mode (either OCA or OCB) is selected by setting MODE[0:3] to 0b010x. The MODE0
controls the activation criteria for the FLAG line, (i.e., when a compare occurs only on channel B or when
a compare occurs on either channel).
This mode allows the MDASM to perform four different output functions:
•
Single-shot output pulse (two edges), with FLAG line activated on the second edge
•
Single-shot output pulse (two edges), with FLAG line activated on both edges
•
Single-shot output transition (one edge)
•
Output port signal, with output compare function disabled
In this mode the leading and trailing edges of variable width output pulses are generated by calculated
output compare events occurring on channels A and B, respectively. OC mode may also be used to perform
a single output compare function, or may be used as an output port bit.
In this mode, channel B is accessed via register B2. A write to register B2 writes the same value to register
B1 even though the contents of B1 are not used in this mode. Both channels work together to generate one
‘single shot’ output pulse signal. Channel A defines the leading edge of the output pulse, while channel B
defines the trailing edge of the pulse. FLAG line activation can be done when a match occurs on channel
B only or when a compare occurs on either channel (as defined by the MODE0 in the MDASMSCR
register).
When this mode is first selected, (i.e., coming from disable mode, both comparators are disabled). Each
comparator is enabled by writing to its data register; it remains enabled until the next successful
comparison is made on that channel, whereupon it is disabled. The values stored in registers A and B are
compared with the count value on the selected 16-bit counter bus when their corresponding comparators
are enabled.
FLAG reset
by software
Mode selection; EDPOL = 0 (Channel A capture on rising edge)
Input signal
Counter Bus
FLAG bit
0xxxxx
0x1000
0xxxxx
0x1000
Register B1
Register B2
0x1000
0xxxxx
0x1000
0x1400
0x1400
0x1000
0x1400
0x1400
0x1000
0x16A0
0x1400
0x16A0
Edge Trigger
Register A
0xxxxx
0xxxxx
Rising
Edge Trigger
Rising
Flag set
Flag set
Internal Register, not accessible to software
FLAG reset
by software
Edge Trigger
Rising
FLAG reset
by software
(Ignored)
Flag set
16-bit
0x0500
0x1000
0x1100
0x1400
0x1525
0x16A0
Summary of Contents for MPC561
Page 84: ...MPC561 MPC563 Reference Manual Rev 1 2 lxxxiv Freescale Semiconductor...
Page 144: ...Signal Descriptions MPC561 MPC563 Reference Manual Rev 1 2 2 46 Freescale Semiconductor...
Page 206: ...Central Processing Unit MPC561 MPC563 Reference Manual Rev 1 2 3 62 Freescale Semiconductor...
Page 302: ...Reset MPC561 MPC563 Reference Manual Rev 1 2 7 14 Freescale Semiconductor...
Page 854: ...Time Processor Unit 3 MPC561 MPC563 Reference Manual Rev 1 2 19 24 Freescale Semiconductor...
Page 968: ...Development Support MPC561 MPC563 Reference Manual Rev 1 2 23 54 Freescale Semiconductor...
Page 1144: ...Internal Memory Map MPC561 MPC563 Reference Manual Rev 1 2 B 34 Freescale Semiconductor...
Page 1212: ...TPU3 ROM Functions MPC561 MPC563 Reference Manual Rev 1 2 D 60 Freescale Semiconductor...
Page 1216: ...Memory Access Timing MPC561 MPC563 Reference Manual Rev 1 2 E 4 Freescale Semiconductor...