3-14
SBC-845D-VEA Single Board Computer User’s Guide
// 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.
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.
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.
Summary of Contents for SBC-845D-VEA
Page 6: ...vi SBC 845D VEA Single Board Computer User s Guide This page intentionally left blank...
Page 8: ...viii SBC 845D VEA Single Board Computer User s Guide This page intentionally left blank...
Page 12: ...xii SBC 845D VEA Single Board Computer User s Guide This page intentionally left blank...
Page 14: ...xiv SBC 845D VEA Single Board Computer User s Guide This page intentionally left blank...
Page 20: ...xx SBC 845D VEA Single Board Computer User s Guide This page intentionally left blank...