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) 12 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) 12 Page - STMicroelectronics

Back Button 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 AN3023 Datasheet HTML 16Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 12 / 23 page
background image
Configuring ADC registers for conversion
AN3023
12/23
Doc ID 16113 Rev 1
Practical use
Continuous conversion mode is useful for collecting a set of analog values from an external
analog signal (for example, to read an AC voltage waveform).
Single scan mode
Single scan mode is started by triggering a conversion while the SCAN bit is set in the
ADC_CR2 register and the CONT bit is 0 in the ADC_CR1 register. The scan is performed
from channel 0 up to the channel n programmed in bits CH[3:0] in register ADC_CSR.
Do not clear the SCAN bit while the conversion sequence is in progress. Single scan mode
can be stopped immediately by clearing the ADON bit in the ADC_CR1 register.
Example 3
●
fMASTER = 4 MHz
●
fADC = 1 MHz
●
Single scan mode from AIN0 to AIN5 channel
●
Right alignment
●
Starting ADC by software
For Example 3, 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] = 0101
→ select the scan from AIN0 to AIN5
ADC_CR1:ADON = 1
→ ADC power on
Wait (14/fADC) → stabilization time before starting the conversion
ADC_CR2:SCAN = 1
→ scan mode enable
ADC_CR2:ALIGN = 1
→ right alignment
ADC_CR1:ADON = 1
→ starting the conversion by software
Wait (ADC_CSR:EOC = 1)
→ end of conversion
Read the result of the conversion in ADC_DBxRH and ADC_DBxRL data buffer registers,
where x = 0..5.
Practical use
Single scan mode is useful for collecting different analog values from external sensors. This
conversion mode permits a faster conversion operation than the simple single conversion
mode (which requires conversion to be performed channel per channel).
Continuous scan mode
Continuous scan mode is started by triggering a conversion while the SCAN bit is set in the
ADC_CR2 register and CONT bit is set in the ADC_CR1 register. The scan is performed
from channel 0 up to the channel n programmed in bits CH[3:0], and, when the EOC bit is
set, a new scan is started automatically. The data buffer registers must be read before the
completion of new scan sequence, otherwise the data buffers are overwritten.
Do not clear the SCAN bit while scan conversion is in progress. Continuous scan mode can
be stopped immediately by clearing the ADON bit in the ADC_CR1 register. Alternatively, if



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