Advantech PCM-3353 Bedienungsanleitung Seite 61

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 70
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 60
53 PCM-3353 User Manual
Appendix D GPIO Sample Code
; bl= the n group of gpio status
; bit 0 = gpio 0 , 0 => Low; 1 => High
; bit 1 = gpio 1 , 0 => Low; 1 => High
; .....
; bit 7 = gpio 7 , 0 => Low; 1 => High
;===============================================================
====
;===============================================================
====
; Set GPIO status
; Input:
; ax=5E87h
; bh=04h
; cl= n ; n means which group of GPIO you want to set
; bl= the n group of gpio status
; bit 0 = gpio 0 , 0 => Low; 1 => High
; bit 1 = gpio 1 , 0 => Low; 1 => High
; .....
; bit 7 = gpio 7 , 0 => Low; 1 => High
; output:
; ax=5E78 ;function success, other value means function fail
;===============================================================
================
mov ax,5e87h
mov bh,00h
int 15h
cmp ax,5e78h
je next_test
lea dx, Error_Str1
mov ah,09h
int 21h
jmp Finish_Test
next_test:
xor ch,ch
push cx ;save NO. of GPIO chip
;1.Set GPIO 0,2,4,6 as output, GPI 1,3,5,7 as input
mov ax,5e87h
mov bx,02aah
int 15h
;2. Set GPIO 0,2,4,6 Output Low
pop cx ;restore NO. of GPIO chip
push cx ;save NO. of GPIO chip
mov ax,5e87h
mov bx,0400h
Seitenansicht 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 69 70

Kommentare zu diesen Handbüchern

Keine Kommentare