Electronic Components Datasheet Search |
|
AN3023 Datasheet(PDF) 11 Page - STMicroelectronics |
|
AN3023 Datasheet(HTML) 11 Page - STMicroelectronics |
11 / 23 page AN3023 Configuring ADC registers for conversion Doc ID 16113 Rev 1 11/23 For Example 1, the ADC registers should be configured as follows: ADC_CR1:SPSEL[2:0] = 010 → f ADC = 4 MHz (that is, fMASTER/4) ADC_CSR:CH[3:0] = 0001 → AIN1 channel selected ADC_CR1:ADON = 1 → ADC power on Wait (14/fADC) → stabilization time before starting the conversion ADC_CR1:CONT = 0 → single conversion mode Note: Do not perform the operation “ADC_CR1:CONT = 0 → single conversion mode” if the CONT bit is already 0 (see note in Section 3.1.2). ADC_CR2:ALIGN = 0 → left alignment ADC_CR1:ADON = 1 → starting the conversion by software Wait (ADC_CSR:EOC = 1) → end of conversion See the result of the conversion in ADC data registers ADC_DRH and ADC_DRL. Continuous conversion mode In continuous conversion mode, the ADC starts another conversion as soon as it finishes the last one. A new conversion starts automatically. For this conversion mode, set the CONT bit to ‘1’ in the ADC_CR1 register. Example 2 ● fMASTER = 4 MHz ● fADC = 1 MHz ● Channel = AIN2 ● Continuous conversion model, right alignment ● Starting ADC by external trigger event on ADC_ETR pin For Example 2, the ADC registers should be configured as follows: ADC_CR1:SPSEL[2:0] = 010 → f ADC = 1 MHz (that is, fMASTER/4) ADC_CSR:CH[3:0] = 0010 → AIN2 channel is selected ADC_CR1:ADON = 1 → ADC power on Wait (14/fADC) → stabilization time before starting the conversion ADC_CR1:CONT = 1 → continuos conversion mode ADC_CR2:ALIGN = 1 → left alignment ADC_CR2:EXTSEL[1:0] = 01 → External trigger on ADC_ETR ADC_CR2:EXTTRIG = 1 → conversion on external event is enabled Rising edge on ADC_ETR pin Wait (ADC_CSR:EOC = 1) → end of conversion If you want to save the result of the current conversion, save the values of data register ADC_DRH and ADC_DRL before starting the next conversion. |
Similar Part No. - AN3023 |
|
Similar Description - AN3023 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |