CMT2380F17
Rev0.1 | 284/347
www.cmostek.com
(2) Enable the ADC interrupt by setting bits EADC (in EIE1 register) and EA (in IE register), and then the
CPU will jump into its Interrupt Service Routine when the conversion is completed. Regardless of (1) or (2),
the ADCI flag should be cleared by software before next conversion.
使用
26.2.4
ADC Conversion Rate
The user can select the appropriate conversion speed according to the frequency of the analog input
signal. The maximum input clock of the ADC is 24MHz and it operates a minimum conversion time with 30
ADC clocks. User can configure the ADCKS2~0 (ADCFG0.7~5), SHT (ADCFG2.7~0) and HA (ADCFG3.5) to
specify the conversion rate. The following equation is the clock number of one ADC conversion:
Please note is the input signal is AC signal, fN, and assume the sample rate is fS, based on Nyquist theorem,
fS should large than 2 times fN to ensure the measurement accuracy.
For example,
1.
To get 800K Sample Rate:
If SYSCLK= 24MHz and the ADCKS = SYSCLK is selected, SHT = 0, Then conversion rate fS =
24MHz/(30+0) = 800K sps.
(In this case, the AC input signal fN frequency should lower than 400KHz to ensure the measurement
accuracy.)
2.
To get 150K Sample Rate:
If SYSCLK= 24MHz and the ADCKS = SYSCLK/4 is selected, SHT = 10, Then conversion rate fS =
24MHz/4/(30+10) = 150K sps.
(In this case, the AC input signal fN frequency should lower than 75KHz to ensure the measurement
accuracy.)
26.2.5
ADC Interrupts
The ADC interrupt of CMT2380F17 includes 3 sources:
1.
ADCI, when an A/D conversion is completed, ADCI will be set to invoke an interrupt. The interrupt
on this flag can be blocked by IGADCI (ADCFG1.7).
2.
SMPF, it is set when an ADC channel sample & hold is completed to invoke an interrupt. The
interrupt on this flag can be blocked by SMPFIE (ADCFG1.5).
3.
ADCWI, under ADC Window Compare mode, this Interrupt flag will be held when Window
Comparison Data match has occurred. An interrupt is invoked if it is enabled. The interrupt on this flag can be
enabled by EADCWI. (ADCFG1.6)
有
3
种
ADC
中断源:
Figure 26
–2. ADC Interrupt
Содержание CMT2380F17
Страница 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Страница 111: ...CMT2380F17 Rev0 1 111 347 www cmostek com INT2IS 1 0 Selected Port Pin of nINT2 00 P4 4 01 P3 0 10 P1 1 11 P1 6...
Страница 131: ...CMT2380F17 Rev0 1 131 347 www cmostek com Figure 16 1 Timer 0 Mode 0 Structure Figure15 2 Timer 1 Mode 0 Structure...
Страница 161: ...CMT2380F17 Rev0 1 161 347 www cmostek com Figure 16 32 Split Timer 3 Mode 1 Structure AR with Ex INT...
Страница 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Страница 239: ...CMT2380F17 Rev0 1 239 347 www cmostek com Figure 19 5 8 bit Timer Mode Configuration for S1BRG S1TME 1...
Страница 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...
Страница 289: ...CMT2380F17 Rev0 1 289 347 www cmostek com...