A-3
WDT & GPIO
GPIO Sample Code
GPI 0 ~ GPI 7
GPI 0 GPI 1 GPI 2 GPI 3 GPI 4 GPI 5 GPI 6 GPI 7
IO Address
(SMbus Address)
F040h F040h F040h F040h F040h F040h F040h F040h
Slave Address
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
GPIO Status register
40h
40h
40h
20h
20h
20h
20h
20h
Bit
1
2
3
3
4
5
6
7
Sample code
#1
GPO 0 ~ GPO 7
GPO 0 GPO 1 GPO 2 GPO 3 GPO 4 GPO 5 GPO 6 GPO 7
IO Address
(SMbus Address)
F040h F040h F040h F040h F040h F040h F040h F040h
Slave Address
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
6Eh
GPIO Status register
40h
10h
10h
10h
20h
20h
20h
10h
GPIO Data register
41h
11h
11h
11h
21h
21h
21h
11h
Bit
0
3
6
7
0
1
2
4
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 6Eh
GPIO_Status
equ 40h
GPIO_Data
equ 41h
GPI_0
equ 00000000b
GPO_0
equ 00000001b
------------------------------------------------------------------------------
Sample Code:
#1 : Set GPI 0 status
mov ax, SLAVE_ADDRESS GPIO_Status ; for GPI 0 set 6E40h
mov cl, GPI_0 ;bit1=GPI 0 status
push ax
mov dx, SMBUS_ADDRESS
mov al,1eh ;clear(bit1~4) status
out dx,al
Summary of Contents for SYS8F377VGGA-OM
Page 1: ...i v1 x Industrial Computer Board SYS8F377VGGA OM ...
Page 50: ......