Appendix
EC0-1814(B)
- 45 -
outportb(DATA_PORT, oldval);
}
else
{
oldval |= 0x01;
outportb(DATA_PORT, oldval);
outportb(INDEX_PORT,0xf7);
outportb(DATA_PORT, Wmode);
}
outportb(INDEX_PORT,0xf5);
If (Wtime == 0)
outportb(DATA_PORT,0x08);
Else
outportb(DATA_PORT,0x00);
outportb(INDEX_PORT,0xf6);
If (Timeout == 0)
outportb(DATA_PORT,0x00);
Else
outportb(DATA_PORT, Timeout);
}
Digital IO Programming Guide
The board provides 8-channel programmable digital IO pins, four for input while the
other four for output. The following provides digital I/O program in C language;
please follow the steps below to implement digital I/O programming:
(The GPIO1 ~ 8 described in the Users’ Manual are corresponding with GPIO30, 31,
34, 35, 36, 37, 20 and 21 of the Super IO; take GPIO1, 2, 3 and 4 setting to input (it is
read-only for input) and GPIO5, 6, 7 and 8 setting to output (it is read and write for
output) as an example).
Initialize digital I/O
Input/output program
(1)
Initialize Digital I/O:
#define INDEX_PORT
0x2E