Electronic Components Datasheet Search |
|
AN431 Datasheet(PDF) 7 Page - STMicroelectronics |
|
AN431 Datasheet(HTML) 7 Page - STMicroelectronics |
7 / 15 page ANALOG KEYBOARD 7/15 ;************************************************************************** ;* * * ;* SGS-THOMSON GRAFING * ;* * ;* APPLICATION NOTE 431 - ST6 * * ;* * ;* Use of ADC inputs for multiple key decoding * ;* * * ;* With the inbuilt A/D converter of any ST6 it is easy to * ;* implement a small routine which enables ONE port pin, con- * ;* figured as an ADC input, to decode up to ten different switches* ** ;* All that is necessary is to set one port pin as an ADC input * ;* Then the program runs in an endless loop until one of the * * ;* connected keys is pushed. * * ;* The value from the ADC data register is then used to decide * ;* how the program will continue,on reaction to the key-push. * * ;* * ;************************************************************************** ;***REGISTERS*** ddrpb .def 0c5h ;port B data direction register orpb .def 0cdh ;port B option register drpb .def 0c1h ;port B data register adr .def 0d0h ;A/D data register adcr .def 0d1h ;A/D control register a .def 0ffh ;accumulator ;***CONSTANTS*** inpall .equ 000h ;used for setting all pins input peg1_2 .equ 00ch ;border to distinguish between switch1 and switch2 peg2_3 .equ 025h ;border to distinguish between switch2 and switch3 peg3_4 .equ 03eh ;border to distinguish between switch3 and switch4 peg4_5 .equ 058h ;border to distinguish between switch4 and switch5 peg5_6 .equ 072h ;border to distinguish between switch5 and switch6 peg6_7 .equ 08ch ;border to distinguish between switch6 and switch7 peg7_8 .equ 0a5h ;border to distinguish between switch7 and switch8 peg8_9 .equ 0beh ;border to distinguish between switch8 and switch9 APPENDIX A: Key Input by Polling |
Similar Part No. - AN431 |
|
Similar Description - AN431 |
|
|
Link URL |
Privacy Policy |
ALLDATASHEET.NET |
Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link Exchange | Manufacturer List 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 |