WDT & GPIO
COM Express Carrer Board
A-3
WDT & GPIO
COM Express Carrer Board
GPIO Sample Code
JGPIO1
GPI 0 ~ GPI 3
GPI 0 GPI 1 GPI 2 GPI 3
IO Address
SIO GPIO Register B2h
Bit
0
1
2
3
Sample code
#1
GPO 0 ~ GPO 3
GPO 0 GPO 1 GPO 2 GPO 3
IO Address
SIO GPIO Register B1h
Bit
4
5
6
7
Sample code
#2
SIO_INDEX_Port
equ
04Eh
SIO_DATA_Port
equ
04Fh
SIO_UnLock_Value
equ
087h
SIO_Lock_Value
equ
0AAh
SIO_LDN_GPIO
equ
06h
GPI_REG
equ
0B2h
GPO_REG
equ
0B1h
GPO0_Value
equ
00010000b
Sample Code:
#1 : Get GPI 0 status
; Enable config mode
mov dx, SIO_INDEX_Port
mov al, SIO_UnLock_Value
out dx, al
jmp short $+2
;Io_delay
jmp short $+2
;Io_delay
out dx, al
; Switch GPIO Configuration for SIO LDN 0x06
mov
dx, SIO_INDEX_Port
mov
al, 07h
out
dx, al
mov
dx, SIO_DATA_Port
mov
al, SIO_LDN_GPIO
out
dx, al
; Get GPI 0 Pin Status Register
Содержание MS-9988
Страница 1: ... MS 9988 COM Express Carrier Board ...
Страница 54: ......