System Installation
ROBO-8712VLA User’s Manual
3-8
outp(0x002F, 0x01);
// Select Inversion Mode
outp(0x002E, 0xF2);
outp(0x002F, (inp(0x002F) & 0x0F) | ( Inversion Register & 0xF0));
// Select I/O Mode
outp(0x002E, 0xF0);
outp(0x002F, (inp(0x002F) & 0x0F) | ( I/O Selection Register & 0xF0));
// Access GPIO ports
outp(0x002E, 0xF1);
outp(0x002F, (inp(0x002F) & 0x0F) | ( Output Data & 0xF0));
or
Input Data = inp(0x002F);
// Exit Extended Function Mode
outp(0x002E, 0xAA);
Definitions of Variables:
Each bit in the high nibble of each Register represents the setting of a GPIO port.
Bit4 vs. GPIO port 1
Bit5 vs. GPIO port 2
Bit6 vs. GPIO port 3
Bit7 vs. GPIO port 4
Value of Inversion Register :
Only high nibble is available for this function.
When set to a ‘1’, the incoming/outgoing port value is inverted.
When set to a ‘0’, the incoming/outgoing port value is the same as in Data
Register.
Value of I/O Selection Register :
Only high nibble is available for this function.
When set to a ‘1’, respective GPIO port is programmed as an input port.
When set to a ‘0’, respective GPIO port is programmed as an output port.
Value of Output Data / Input Data :
Only high nibble is available for this function.
If a port is assigned to be an output port, then its respective bit can be
read/written.
If a port is assigned to be an input port, then its respective bit can be read
only.
Notes:
1) All the Buffered Digital Outputs are open-drain amplified form corresponding
GPIO ports.
2) Some other functions may occupy the lower nibble of the registers. Altering any
content in lower nibble will be undesired.