Gpio Sample Code - MSI MS-98B5 Manual

Industrial computer board
Table of Contents

Advertisement

GPIO Sample Code

GPI 0 ~ GPI 3
GPI 0
IO Address
53Ah
SIO GPIO Register
Bit
0
Sample code
#1
GPO 0 ~ GPO 3
GPO 0
IO Address
50Ch
SIO GPIO Register
Bit
1
Sample code
#2
GPI_ADD
GPI_ADD 1
GPI_ADD 2
GPO_ADD
GPO_ADD1
GPO_0
Sample Code:
Sample Code:
#1 : Get GPI 0 status
in
al, GPI_ADD2
;al bit0 = GPI 3 status
#2 : Set GPO 0 to high status
mov
dx, GPO_ADD
in
al, dx
and
al, Not GPO_0
or
al, GPO_0
out
dx, al
GPI 1
GPI 2
GPI 3
50Eh
538h
538h
6
2
3
#1
#1
#1
GPO 1
GPO 2
GPO 3
50Ch
50Ch
50Eh
6
7
1
#2
#2
#2
equ
50Eh
equ
538h
equ
53Ah
equ
50Ch
equ
50Eh
equ
00000010b
MS-98B5
MS-98B5
A-3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents