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

X  

AN1809 数据表(PDF) 5 Page - STMicroelectronics

部件名 AN1809
功能描述  STR71x ADC DRIVING AN ANALOG KEYBOARD
PDF  8 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN1809 数据表(HTML) 5 Page - STMicroelectronics

  AN1809 Datasheet HTML 1Page - STMicroelectronics AN1809 Datasheet HTML 2Page - STMicroelectronics AN1809 Datasheet HTML 3Page - STMicroelectronics AN1809 Datasheet HTML 4Page - STMicroelectronics AN1809 Datasheet HTML 5Page - STMicroelectronics AN1809 Datasheet HTML 6Page - STMicroelectronics AN1809 Datasheet HTML 7Page - STMicroelectronics AN1809 Datasheet HTML 8Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 5 / 8 page
background image
5/8
STR71x ADC Driving an Analog Keyboard
2 SOFTWARE CONFIGURATION
This software example manages the STR71x ADC configuration, and the key recognition
using the ADC software library.
After configuring the analog input as a high impedance analog input, the STR71x ADC has to
be enabled by setting the ADC_EN bit in the PCU_BOOTCR register. This action is followed
by selecting the Single Channel conversion mode and the Channel to be converted by setting
the AXT bit and writing the channel number in the A[1:0] bits in the Control Status Register
(ADC_CSR). Next, the prescaler has to be configured. Waiting for the availability of data in the
corresponding DATA register is done by looping on the Data Available flag (DAn) in
ADC_CSR register. After that, we can get the conversion result which will be calibrated.
The next step is the key recognition. This part of the software consists of testing if the conver-
sion result belongs to the range of the value of each key voltage. This range is defined by the
lower voltage (min [key]) and the higher voltage (max [key]) that are considered as corre-
sponding to the typical voltage of the key (Val [key]). This range is due to the resistor toler-
ance. Once the pressed key is recognized, its number is shown on four leds connected to
GPIO port 0 pins.
The main program is given by the next flowchart.



Html Pages

1 2 3 4 5 6 7 8


数据表 下载

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