công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

AN3023 bảng dữ liệu(PDF) 11 Page - STMicroelectronics

tên linh kiện AN3023
Giải thích chi tiết về linh kiện  Using the analog-to-digital converter of the STM8A microcontroller
PDF  23 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3023 bảng dữ liệu(HTML) 11 Page - STMicroelectronics

Back Button AN3023 Datasheet HTML 7Page - STMicroelectronics AN3023 Datasheet HTML 8Page - STMicroelectronics AN3023 Datasheet HTML 9Page - STMicroelectronics AN3023 Datasheet HTML 10Page - STMicroelectronics AN3023 Datasheet HTML 11Page - STMicroelectronics AN3023 Datasheet HTML 12Page - STMicroelectronics AN3023 Datasheet HTML 13Page - STMicroelectronics AN3023 Datasheet HTML 14Page - STMicroelectronics AN3023 Datasheet HTML 15Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 23 page
background image
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.



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


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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