
MOTOROLA
Chapter 17. Modular Input/Output Subsystem (MIOS14)
17-33
MIOS14 Double Action Submodule (MDASM)
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
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
0x1000
0x1400
0x1000
0x16A0
0x1400
0x16A0
Edge Trigger
Register A
0xxxxx
Rising
Edge Trigger
Rising
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