
A-3
WDT & GPIO
MS-98F1
GPIO Sample Code
GPI 0 ~ GPI 3
GPI 0 GPI 1 GPI 2 GPI 3
IO Address
(SMbus Address)
F040h F040h F040h F040h
Slave Address
9Ch
9Ch
9Ch
9Ch
SIO GPIO Register 20h
20h
20h
20h
Bit
4
5
6
7
Sample code
#1
GPO 0 ~ GPO 3
GPO 0 GPO 1 GPO 2 GPO 3
IO Address
(SMbus Address)
F040h F040h F040h F040h
Slave Address
9Ch
9Ch
9Ch
9Ch
SIO GPIO Register 20h
20h
20h
20h
Bit
0
1
2
3
Sample code
#2
SMBUS_ADDRESS
equ F040h
SMBUS_ADDRESS02 equ SMBUS_A02h ;set command type and start the operation
SMBUS_ADDRESS03 equ SMBUS_03h ;set register index
SMBUS_ADDRESS04 equ SMBUS_04h ;set slave address
SMBUS_ADDRESS05 equ SMBUS_05h ;set register value
SLAVE_ADDRESS
equ 09Ch
SIO_GPIO2x_Status
equ 020h
SIO_GPIO2x_Data
equ 021h
GPI_0
equ 00000000b
GPO_0
equ 00000001b
------------------------------------------------------------------------------
Sample Code:
#1 : Set GPI 0 status
mov ax, SLAVE_ADDRESS SIO_GPIO2x_Status
mov cl, GPI_0 ;bit1=GPI 0 status
push ax
mov dx, SMBUS_ADDRESS
mov al,1eh ;clear(bit1~4) status
out dx,al
pop ax
Содержание MS-919-98F1-103
Страница 1: ...i MS 98F1 v1 x Industrial Computer Board...
Страница 14: ...1 6 Overview...
Страница 32: ...2 18 Hardware Setup...
Страница 43: ...3 11 MS 98F1 GPIO Group Configuration GPO0 GPO3 These settings control the operation mode of the specified GPIO...
Страница 58: ......