System Installation
ROBO-6710/6730VLA User’s Manual
3-7
Definitions of Variables:
Value of
Count-mode Register
:
1) 0x00 -- Count down in seconds (Bit3=0)
2) 0x08 -- Count down in minutes (Bit3=1)
Value of
Time-out Value Register
:
1) 0x00 -- Time-out Disable
2) 0x01~0xFF -- Value for counting down
3.6 GPIO
The ROBO-6710/6730 support 8 programmable high-driving GPIO 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.
#include <stdio.h>
#include <dos.h>
int main(void)
{
int x,outdata,indata;
printf("Now output data to GPIO Port ...");
// Enter the extended function mode
outport(0x2e,0x87);
outport(0x2e,0x87);
// GPIO multiplexed pin selection
outport(0x2e,0x2a);
outport(0x2f,0xff);
//GP10 - GP14 enable
// Enable GPIO port1
outport(0x2e,0x30);
outport(0x2f,0xff);
//Enable GPIO function
// Select the logical device
outport(0x2e,0x07);
outport(0x2f,0x07);
// Device 7