System Installation
RUBY-D716VG2AR User’s Manual
3-12
3.6 GPIO
The motherboard provides 4 input / output ports that can be individually
configured to perform a simple basic I/O function.
GPIO Pin Assignment
The RUBY-D716VG2AR provides 4 input/output ports that can be individually
configured to perform a simple basic I/O function. Users can configure each
individual port to become an input or output port by programming register bit of
I/O Selection. To invert port value, the setting of Inversion Register has to be made.
Port values can be set to read or write through Data Register.
The GPIO port is located on J11 shown as follows. Please note: Do not short the Pin
9
and Pin 10 of the
J11!
The control for the GPIO signals is handled through a separate 1-byte I/O space.
J11: General Purpose I/O Connector
PIN No.
Signal Description
PIN No.
Signal Description
1 GPIO0
2 GPIO4
3 GPIO1
4 GPIO5
5 GPIO2
6 GPIO6
7 GPIO3
8 GPIO7
9 GND
10 VCC
GPIO Control Command Example (C Language)
#include <stdio.h>
#include <dos.h>
#define EC_BASE 0x4E
#define EC_IO_BASE 0x2E
#define EC_PIN1_VALUE_ADDR 0x160A /*bit 0*/
#define EC_PIN2_VALUE_ADDR 0x160A /*bit 1*/
#define EC_PIN3_VALUE_ADDR 0x160A /*bit 2*/
#define EC_PIN4_VALUE_ADDR 0x160A /*bit 3*/
#define EC_PIN5_VALUE_ADDR 0x1605 /*bit 0*/
#define EC_PIN6_VALUE_ADDR 0x1605 /*bit 7*/
#define EC_PIN7_VALUE_ADDR 0x1603 /*bit 0*/
#define EC_PIN8_VALUE_ADDR 0x1607 /*bit 0*/
#define EC_PIN1_CTL_ADDR 0x1658 //J0 ~ J3
#define EC_PIN2_CTL_ADDR 0x1659
#define EC_PIN3_CTL_ADDR 0x165A
#define EC_PIN4_CTL_ADDR 0x165B