Acnodes FES 2213 User Manual
Page 57
GPIO Sample Code
The SCH31 14 Runtim e base I/O address is 600h
.model small
.486p
.stack2 56
.data
SCH3114_IO EQU 6 00h
.code
org 100h
.STARTup
;================= ===== ======================== ===== =======================
; Configuration GPIO as GPI or GPO by below register:
; GPIO0=23H, GPIO4=27H
; GPIO1=24H, GPIO5=29H
; GPIO2=25H, GPIO6=2AH
; GPIO3=26H, GPIO7=2BH
; Set 00H as output type, set 01H as input type
;================= ===== ======================== ===== =======================
;================= ===== ======================== ===== =======================
; Register 4BH configuration GP O value as high or low:
; 1= HIGH
; 0= LOW
;================= ===== ======================== ===== =======================
mov dx,SCH3114_IO + 23h
;GPIO 0
mov al, 00h
;Se t GP IO 0 as output type
out dx, a l
mov dx,SCH3114_IO + 4Bh
mov al, 01h
;Se t GP IO 0 as high value
out dx, a l
.exit
END