Vortex86DX-MSJK CE 6.0 Jump Start - Getting Started Guide
Vortex86DX-MSJK Windows Embedded CE 6.0 R3 Jump Start Rev 2.0
Page 139
Outportb(0x98, 0xff);
To configure all 8-bits on Port-1 to output mode:
Outportb(0x99, 0xff);
To configure only bit-0, bit-1, bit-2 and bit-3 on Port-0 to output mode:
Outportb(0x98, 0x0f);
To configure only bit-0, bit-1, bit-2 and bit-3 on Port-1 to output mode:
Outportb(0x99, 0x0f);
To configure bit-4, bit-5, bit-6 and bit-7 on Port-0 to output mode:
Outportb(0x98, 0xf0);
To configure bit-4, bit-5, bit-6 and bit-7 on Port-1 to output mode:
Outportb(0x99, 0xf0);
To configure bit-0 and bit-3 on Port-0 to output mode:
Outportb(0x98, 0x05);
To configure bit-0 and bit-3 on Port-1 to output mode:
Outportb(0x99, 0x05);
After the GPIO port is configured to output mode, each GPIO bit can be toggle to high or low by
writing appropriate value to the data register at 78H for Port-0 and 79H for Port-1, as follow:
To set all 8 GPIO bits on Port-0 to high:
Outportb(0x78, 0xff);
To set all 8 GPIO bits on Port-1 to high:
Outportb(0x79, 0xff);
To set only bit-0, bit-1, bit-2 and bit-3 on Port-0 to high:
Outportb(0x78, 0x0f);
To set only bit-0, bit-1, bit-2 and bit-3 on Port-1 to high:
Outportb(0x79, 0x0f);
To set only bit-4, bit-5, bit-6 and bit-7 on Port-0 to high:
Outportb(0x78, 0xf0);
To set only bit-4, bit-5, bit-6 and bit-7 on Port-1 to high:
Outportb(0x79, 0xf0);
To set only bit-0 and bit-3 on Port-0 to high:
Outportb(0x78, 0x05);
To set only bit-0 and bit-3 on Port-1 to high:
Outportb(0x79, 0x05);
To set all 8 GPIO bits on Port-0 to low:
Outportb(0x78, 0x00);
To set all 8 GPIO bits on Port-1 to low:
Outportb(0x79, 0x00);
Note:
When a GPIO bit is set to high, it provides 3.3V and able to supply up to 16 mA of current, sufficient
current to drive an LED.
When connecting an LED to the GPIO, make sure to add appropriate resistor to minimize current flow to
prevent damage to the SBC.