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

X  

AN2979 数据表(PDF) 5 Page - STMicroelectronics

部件名 AN2979
功能描述  Implementing a simple ADC using the STM8L101xx comparator
PDF  12 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN2979 数据表(HTML) 5 Page - STMicroelectronics

  AN2979 Datasheet HTML 1Page - STMicroelectronics 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 Next Button
Zoom Inzoom in Zoom Outzoom out
 5 / 12 page
background image
AN2979
Software description
Doc ID 15651 Rev 1
5/12
2
Software description
The software provided with this application note describes a way of implementing an A/D
converter (using a timer and analog comparator interrupts).
The application uses four peripherals:
CLK: the clock enables and provides the correct clock frequency for the peripherals.
COMP: the comparator detects when the input voltage is above the reference voltage
TIM2: Timer 2 provides the 2 ms PWM with a duty cycle of 0.25 generating the
capacitor charge and discharge. Timer 2 Capture/compare interrupt routine handles
the conversion.
GPIO: the general purpose I/O handles the I/O used.
SPI: used to communicate with the LCD.
A generic file param.h contains the parameter values that can be modified in order to re-use
the application and adapt it easily to other conditions.
At the start, the LCD displays “STM8L ADC using COMP”. Then it continously displays the
measured values.
Figure 3.
Application architecture & description
Note:
The software can be compiled with Cosmic and Raisonance compilers. It contains projects
for STVD and Raisonance IDE.
A calibration of some parameters can be optionally set if “#define Calibration” is
uncommented in the param.h file.
param.h
param.c
ai15372
main.c
stm8l10x.h
stm8l10x.h
stm8l10x.h
stm8l10x.h
stm8l10x tim
stm8l10x comp
stm8l10x tim
stm8l10x.comp
stm8l10x cl
stm8l10x api
stm8l10x cl
stm8l10x api
Application layer
API layer
Standard
peripheral drivers
STM8L101x
microcontroller



Html Pages

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


数据表 下载

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