Datenblatt-Suchmaschine für elektronische Bauteile
  German  ▼
ALLDATASHEETDE.COM

X  

AN431 Datenblatt(PDF) 11 Page - STMicroelectronics

Teilenummer AN431
Bauteilbeschribung  Using ST6 analog inputs for multiple key decoding
PDF  15 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Hersteller  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN431 Datenblatt(HTML) 11 Page - STMicroelectronics

Back Button AN431 Datasheet HTML 7Page - STMicroelectronics AN431 Datasheet HTML 8Page - STMicroelectronics AN431 Datasheet HTML 9Page - STMicroelectronics AN431 Datasheet HTML 10Page - STMicroelectronics AN431 Datasheet HTML 11Page - STMicroelectronics AN431 Datasheet HTML 12Page - STMicroelectronics AN431 Datasheet HTML 13Page - STMicroelectronics AN431 Datasheet HTML 14Page - STMicroelectronics AN431 Datasheet HTML 15Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 11 / 15 page
background image
ANALOG KEYBOARD
11/15
en_kint:
ldi
ddrpb,inpall
;sets all port B pins low — all input
ldi
orpb,02h
;option register:
; sets bit b1 high, the rest low
ldi
drpb,01h
;data register:
; sets bit b0 high, the rest low
;— pb0 becomes input, no pull-up, no int
;
pb1 becomes input with pull-up and int.
;
pb2-7 become input with pull-up, but
;
are not used here
ldi
ior,10h
;interrupt option register:
;— set D4: enable all interrupts
;
reset D5: falling edge on int.input(#2)
ret
;return to the calling address
;*** hd_kint (handle key interrupt) interrupt service routine
;*** evaluates the data resulting in pushing a key.
;*** Interrupt vector #2 (0ff4h and 0ff5h) must point (jump) to hd_kint.
hd_kint:
ldi
drpb,03h
;data register:
; 0000 0011
ldi
ddrpb,01h
;data direction register:
; 0000 0001
; — pb0 becomes output
ldi
orpb,03h
;option register:
; 0000 0011
; — pb0: push-pull output
; — pb1: ADC-input
;
pb2-7 become input with pull-up, but
;
are not used here
ldi
adcr,30h
;A/D control register:
; 0011 0000 — -activate A/D converter
;
-start conversion
;
-disable A/D interrupt
loop:
jrr
6,adcr,loop
;waits until the End Of Conversion
; bit is set (indicator that a conversion
; has been completed)
ld
a,adr
;load acc with the result of the A/D
; conversion
;now the result is compared with the
; values which represent the different
; switches



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Datenblatt Download

Go To PDF Page


Link URL



War ALLDATASHEET hilfreich?  [ DONATE ] 

Über Alldatasheet   |   Werbung   |   Kontakt   |   Privatsphäre und Datenschutz   |   Link zum Datenblatt    |   Linktausch   |   Hersteller
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