数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN3137 数据表(PDF) 13 Page - STMicroelectronics

部件名 AN3137
功能描述  Analog-to-digital converter on STM8L and STM8AL devices
PDF  42 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN3137 数据表(HTML) 13 Page - STMicroelectronics

Back Button AN3137 Datasheet HTML 9Page - STMicroelectronics AN3137 Datasheet HTML 10Page - STMicroelectronics AN3137 Datasheet HTML 11Page - STMicroelectronics AN3137 Datasheet HTML 12Page - STMicroelectronics AN3137 Datasheet HTML 13Page - STMicroelectronics AN3137 Datasheet HTML 14Page - STMicroelectronics AN3137 Datasheet HTML 15Page - STMicroelectronics AN3137 Datasheet HTML 16Page - STMicroelectronics AN3137 Datasheet HTML 17Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 42 page
background image
AN3137
STM8L/STM8AL ADC usage/programming
Doc ID 16983 Rev 3
13/42
2
STM8L/STM8AL ADC usage/programming
2.1
Sampling mode overview and usage
2.1.1
Single mode
In this mode, only one input channel must be selected in the ADC_SQRx registers (if more
channels are selected, the highest selected channel is measured). In addition, the DMAOFF
bit must be set in the ADC_SQR1 register (to disable DMA transfer). The input channel is
then converted and the ADC conversion stops (one simple conversion). The converted
value is stored into the ADC_DR data register. An interrupt (EOC) can be generated after
the end of conversion.
Note:
If the DMAOFF bit in the ADC_SQR1 register is reset (and if DMA is properly programmed)
the conversion is then performed in scan mode. Refer to Section 2.1.3: Scan mode.
2.1.2
Continuous mode
In this mode, the ADC does not stop after conversion but continues to the next channel in
the selected channel sequence. Conversions continue until the CONT bit and the ADON bits
are set and the converted values are transferred through the DMA to the RAM or EEPROM
memory buffer. As the EOC interrupt is generated only after the end of the conversion of the
selected channel sequence, the result of each channel conversion cannot be read from the
ADC_DR register.
To save the conversion of each channel in a memory (RAM or EEPROM), the DMA must be
used in peripheral to memory mode. If the CONT bit is reset during a conversion, the current
selected channel sequence conversions end with the last selected channel) and then the
ADC stops.
Note:
The CONT bit must not be set again during a conversion.
2.1.3
Scan mode
This mode works automatically in continuous mode. Refer to Section 2.1.2. It can also be
used in single mode by resetting the DMAOFF bit in the ADC_SQR1 register. Refer to
Section 2.1.1.
In scan mode, the selected channel sequence is taken into account (like in single mode) and
the selected channels are converted and transferred through DMA to memory (DMA should
be properly programmed).
If the single mode is selected, the ADC converts the selected channel sequence and it is
stopped after the last channel conversion. For the next selected channel sequence, a scan
conversion is necessary to restart the ADC.
An interrupt (EOC) can be generated after the end of the channel sequence conversion.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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