Gpio Sample Code - Advantech MIO-2270 User Manual

Amd g-series soc gx-210ja/ gx-415ga pico-itx sbc, ddr 3/3l, 18-bit lvds, vga or hdmi, 1gbe, half-size mini pcie, 4 usb, 2 com, smbus, msata & mioe
Hide thumbs Also See for MIO-2270:
Table of Contents

Advertisement

;WD timer counting = 0
;====================================================
mov dx,SCH3114_IO + 68h
mov al,01h
out dx,al
.exit
END
B.2

GPIO Sample Code

The SCH3114 Runtime base I/O address is 680h
.model small
.486p
.stack 256
.data
SCH3114_IO EQU 680h
.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 GPO value as high or low:
; 1 = HIGH
; 0 = LOW
;====================================================
mov dx,SCH3114_IO + 23h
mov al,00h
out dx,al
mov dx,SCH3114_IO + 4Bh
mov al,01h
out dx,al
.exit
END
;GPIO 0
;Set GPIO 0 as output type
;Set GPIO 0 as high value.
77
MIO-2270 User Manual

Advertisement

Table of Contents
loading

Table of Contents