Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

AN1809 Arkusz danych(PDF) 5 Page - STMicroelectronics

Numer części AN1809
Szczegółowy opis  STR71x ADC DRIVING AN ANALOG KEYBOARD
PDF  8 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  STMICROELECTRONICS [STMicroelectronics]
Strona internetowa  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN1809 Arkusz danych(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


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
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