| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
AN1809 bảng dữ liệu(PDF) 5 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN1809 bảng dữ liệu(HTML) 5 Page - STMicroelectronics |
|
5 / 8 page ![]() 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. |
|
|
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 |
| 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 |