| Electronic Components Datasheet Search |
|
AN1711 Datasheet(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1711 Datasheet(HTML) 5 Page - STMicroelectronics |
|
5 / 40 page ![]() 5/40 SOFTWARE TECHNIQUES FOR COMPENSATING ST7 ADC ERRORS 1.2 SELECTING CONVERSION CHANNEL (AND STARTING CONVERSION) The ADC control register provides control bits for selecting the conversion channel. Whenever you change the channel or write in the control register, the ADC conversion starts again (if the ADC is already enabled). The voltage is sampled from the selected channel. There is no stabilization time required by the ADC after changing the conversion channel and starting conversion. Please refer to the datasheets. 1.3 POLLING FOR END OF CONVERSION The ADC status register has an EOC bit which is for notifying the end of conversion. In some ST7 devices this bit is named COCO for “conversion complete”. Once the ADC is enabled, the conversion is started in continuous mode (except in ADCs with single-conversion feature). When you check and find that the EOC bit is set, the data is avail- able in the data registers (see next section). 1.4 ADC CONVERSION RESULT FORMAT The conversion result of the ADC is available in the ADC data registers. In devices with an 8- bit ADC, an 8-bit register generally called ADCDR, is available for reading the conversion re- sult. In a 10-bit ADC, 2 registers are available for reading the 10-bit result. The most significant 8 bits are available in a register called ADCDRH and the 2 least significant bits are available in the other register generally named ADCDRL. This requires reading the ADCDRL and then ADCDRH. The 10-bit result is obtained by left- shifting ADCDRH by 2 bits and then ‘OR’ing the value of the 2 bits ADCDRL, read previously into a variable. All ST7 10-bit ADCs use the same format, which makes it easy to port software from one device to another. Please take care that the 2-bits of ADCDRH are not lost when left- shifting the register by 2 bits. Please refer to the datasheet for the conversion result format. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | 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 |