| 数据搜索系统,热门电子元器件搜索 |
|
AN431 数据表(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN431 数据表(HTML) 10 Page - STMicroelectronics |
|
10 / 15 page ![]() ANALOG KEYBOARD 10/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 with which you can recognize * ;* if one of nine connected keys is pushed by creating an * ;* interrupt. The program can then decide how it will react * ;* to the key pushed. * ;* * ;* * ;************************************************************************** ;***REGISTERS*** ddrpb .def 0c5h ;port B data direction register orpb .def 0cdh ;port B option register drpb .def 0c1h ;port B data register ior .def 0c8h ;interrupt option 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 ; en_kint (enable key-interrupt) sets the registers in a way that pushing ; any key will cause an interrupt. This subroutine must be called to ; re-enable the key interrupt (e.g. after handling the key service routine) APPENDIX B: Key Input by Interrupt |
|
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 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 |