
ML51/ML54/ML56
Sep. 01, 2020
Page
564
of 719
Rev 2.00
ML
51
/ML
54
/ML
5
6 S
E
RI
E
S
TECHNI
CA
L
RE
F
E
R
E
NC
E
M
A
NU
A
L
ML51/M
L54
/M
L56
Series
Tec
hnical Reference
Manual
PTRGTYP[1:0]
(ADCCON1[3:2])
[00]
[01]
[10]
[11]
00
01
10
PTRGSEL[1:0]
(ADCCON0[5:4])
PWM0CH0
PWM0CH2
PWM0CH4
ADCDLY
External
Trigger
11
STADC
Figure 6.13-2 External Triggering ADC Circuit
ADC Conversion Result Comparator
6.13.3.3
The ML51/ML54/ML56 Series ADC has a digital comparator, which compares the A/D conversion
result with a 12-bit constant value given in ACMPH and ACMPL registers. The ADC comparator is
enabled by setting ADCMPEN (ADCCON2.5) and each compare will be done on every A/D
conversion complete moment. ADCMPO (ADCCON2.4) shows the compare result according to its
output polarity setting bit ADCMPOP (ADCCON2.6). The ADC comparing result can trigger a PWM
Fault Brake output directly. This function is enabled when ADFBEN (ADCCON2.7). When ADCMPO is
set, it generates a ADC compare event and asserts Fault Brake. Please also see Sector 18.1.5“Fault
Brake”.
Note:
After enabling the result compare function, the ADCF register changes to 1 only when ADC
comparing result matches the condition and then enters interrupt vector if ADC interrupt is enabled.
After this bit is enabled and ADC start is triggered, the ADC keeps converting. The register ADCRH
and ADCRL value will change based on the result of ADC setting and can also be read out from the
register. This process only stops after ADCF is set to 1.
ADCR[11:0]
ADCMP[11:0]
+
-
ADCMPO
(ADCCON2.4)
0
1
ADFBEN
(ADCCON2.7)
ADC compare event
ADCMPOP
(ADCCON2.6)
ADCMPEN
(ADCCON2.5)
Figure 6.13-3 ADC Result Comparator
ADC Continues Conversion
6.13.3.4
The ADC controller supports DMA function, which auto store continues the A/D conversion result. The
ADC DMA mode can store 12-bit ADC result into XRAM buffer, and 12-bit ADC data will auto-divide 8-
bit high byte and 4-bit low nibble data two part. For reduce XRAM memory size, two 4-bit nibble data
(continuing ADC conversion results) are automatically combine into one byte size and stored in
XRAM.
The store method as below illustrate. It will store 8-bit of conversion high byte data first, then store
combine data, the split point is ADC continue conversion length which define by ADCCN.