Advantech PCM-3362 User Manual Page 85

  • Download
  • Add to my manuals
  • Print
  • Page
    / 88
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 84
77 PCM-3362 User Manual
Appendix D Watchdog Timer and GPIO sample code
END
D.2 GPIO sample code
;===============================================================
; Get Number of GPIO group
; one group mean 8 gpio pins (one GPIO Chip)
; Input:
; ax=5E87h
; bh=00h
; output:
; ax=5E78 ;function success, other value means function fail
; cl= n group of gpio
mov ax,5E87h
mov bh,00h
INT15
; You will get cl=01 in 8 bit GPIO product, cl = 02 in 16 bit GPIO product
;===============================================================
;===============================================================
; Get GPIO Config
; Input:
; ax=5E87h
; bh=01h
; cl= n ; n means which group of GPIO you want to get
; output:
; ax=5E78 ;function success, other value means function fail
; bl= the n group of gpio config
; bit 0 = gpio 0 , 0 => output pin; 1 => input pin
; bit 1 = gpio 1 , 0 => output pin; 1 => input pin
; .....
; bit 7 = gpio 7 , 0 => output pin; 1 => input pin
mov ax,5E87h
mov bh,01h
mov cl,01h
INT15
; You will get GPIO default setting from bl
;===============================================================
;===============================================================
; Set GPIO Config
; Input:
; ax=5E87h
; bh=02h
Page view 84
1 2 ... 80 81 82 83 84 85 86 87 88

Comments to this Manuals

No comments