Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2979 Datasheet(PDF) 6 Page - STMicroelectronics

Part # AN2979
Description  Implementing a simple ADC using the STM8L101xx comparator
PDF  12 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2979 Datasheet(HTML) 6 Page - STMicroelectronics

Back Button AN2979 Datasheet HTML 2Page - STMicroelectronics AN2979 Datasheet HTML 3Page - STMicroelectronics AN2979 Datasheet HTML 4Page - STMicroelectronics AN2979 Datasheet HTML 5Page - STMicroelectronics AN2979 Datasheet HTML 6Page - STMicroelectronics AN2979 Datasheet HTML 7Page - STMicroelectronics AN2979 Datasheet HTML 8Page - STMicroelectronics AN2979 Datasheet HTML 9Page - STMicroelectronics AN2979 Datasheet HTML 10Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 6 / 12 page
background image
Software description
AN2979
6/12
Doc ID 15651 Rev 1
2.1
Application flowcharts
Figure 4.
Main loop flowchart
Figure 5.
Get conversion value flowchart
ai15766
Configure the system clock to provide a master
clock frequency f
MASTER = 16 MHz
Enable TIM2 peripheral clock
Configure PC4 as input floating
Configure PB0 as output push pull for the PWM
Comparator configuration
Enable comparator interface
Configure COMP2 channel3
With external reference and polarity high
Connect Comp2 output to the TIM2 input capture1
TIM configuration
TIM2 to generate the PWM
Enable TIM2 capture / compare interrupt enable
Enable general interrupts
SPI configuration
Display on LCD
Configure COMP2 channel4
Compare to the reference value
Enable TIM2
Display on LCD
Start
Clock configuration
GPIO configuration
A/D converter
initialization
LCD configuration
Calibration
Optional
Start A/D conversion
End
ai15767
Get timer value
Get the conversion value
Clear TIM2 pending bit
Display on the LCD
Start
End
V
IN
> VREF



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12


Datasheet Download

Go To PDF Page


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


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