![NXP Semiconductors Kinetis KE1xZ256 Reference Manual Download Page 816](http://html1.mh-extra.com/html/nxp-semiconductors/kinetis-ke1xz256/kinetis-ke1xz256_reference-manual_1721813816.webp)
Table 37-6. CMP channel decoding in functional mode and trigger mode (continued)
Mode
RRE
PSEL[
2:0]
MSEL[
2:0]
INPSE
L[1:0]
INNSE
L[1:0]
FXMP
FXMX
CH[2:0
]
CHNx
INP
INN
CMP
Behavior
x
x
1
1
0
0~7
0~7
Channel
fixed by
FXMXCH[
2:0]
Channel
sweep
(CHN
x
)
Channel 0~7
can be swept
with a fixed
channel
(0~7)
x
x
1
1
1
0~7
0~7
Channel
sweep
(CHN
x
)
Channel
fixed by
FXMXCH[
2:0]
Channel 0~7
can be swept
with a fixed
channel
(0~7)
1. "x" means "do not care".
2. PSEL should not be set the same as MSEL.
3. Channel in the sweep side should not be the same as the fixed side.
37.14 Usage Guide
37.14.1 Zero Crossing Detection
A zero-crossing is a point where the sign of a signal’s mathematical function changes
(e.g. from positive to negative), represented by a crossing of the axis (zero value) in the
graph of the signal function. It is a commonly used in electronics application especially
for systems which send digital data over AC circuits.
When in some cases, the “Zero point” could be other voltage than actual 0 V. This “Zero
point” would be used to judge whether the indicated voltage level is reached. In this
situation, the internal DAC could generate the reference voltage level for “Zero point” to
make the comparison with the other input channel of CMP module, and then output the
result of logic “0” and “1”.
To enable the internal DAC and set it as the comparator’s input of minus side, the code
could be as follow:
/* Set internal DAC as minus input. */
CMPx_C1 &= ~CMP_C1_ INNSEL_MASK;
/* Set input channel 3 as plus input. */
CMPx_C1 = (CMPx_C1 & ~(CMP_C1_ INPSEL_MASK | CMP_C1_PSEL_MASK))
| CMP_C1_INPSEL(1) | CMP_C1_PSEL(3);
Then, the CMP output interrupts with their flags would be used to indicate the event of
Zero Crossing Detection.
Usage Guide
Kinetis KE1xZ256 Sub-Family Reference Manual, Rev. 3, 07/2018
816
NXP Semiconductors
Summary of Contents for Kinetis KE1xZ256
Page 2: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 2 NXP Semiconductors...
Page 178: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 178 NXP Semiconductors...
Page 356: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 356 NXP Semiconductors...
Page 410: ...Interrupts Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 410 NXP Semiconductors...
Page 604: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 604 NXP Semiconductors...
Page 634: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 634 NXP Semiconductors...
Page 674: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 674 NXP Semiconductors...
Page 820: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 820 NXP Semiconductors...
Page 1030: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1030 NXP Semiconductors...
Page 1052: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1052 NXP Semiconductors...
Page 1066: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1066 NXP Semiconductors...
Page 1268: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1268 NXP Semiconductors...
Page 1314: ...Usage Guide Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1314 NXP Semiconductors...
Page 1316: ...Kinetis KE1xZ256 Sub Family Reference Manual Rev 3 07 2018 1316 NXP Semiconductors...