Vortex86DX-MSJK CE 6.0 Jump Start - Getting Started Guide
Vortex86DX-MSJK Windows Embedded CE 6.0 R3 Jump Start Rev 2.0
Page 138
Appendix M –
Using GPIO
There are 16-bits GPIO accessible on the VDX-6326 SBC, through the J11 header.
The 16-bits GPIO are extended from the Vortex86DX SoC’s GPIO Port-0 and Port-1, with 8-bits link to
each port. Here are the configuration and data register for the GPIO.
Port 0 Port 1 Description
Data Register
78H
79H
Direction Register 98H
99H
0: GPIO pin is input mode
1: GPIO pin is output mode
Using the GPIO
In this section, we will provide sample codes showing how to configure and use the VDX-6326 GPIO.
Windows Embedded CE Sample Codes
Following are two functions, using inline assembly code, to write to and read from the
Vortex86DX SoC’s register.
#include “stdafx.h”
unsigned char inportb(int addr)
{
__asm
{
push edx
mov edx, DWORD PTR addr
in al, dx
and eax, 0xff
pop edx
}
}
void outportb(int addr, unsigned char val)
{
__asm
{
push edx
mov edx, DWORD PTR addr
mov al, BYTE PTR val
out dx, al
pop edx
}
}
Configure GPIO to Output Mode
The GPIO can be used to light up or blink LEDs to function as visual status indicator, to trigger
relay or send reset signal to another controller.
Each of the 8-bits on Port-0 and Port-1 can be configured independently to input or output
mode, by writing the appropriate value to the direction register at 98H for Port-0 and 99H for
Port-1, as follow:
To configure all 8-bits on Port-0 to output mode: