User manual
17 The ENDAT-7100M System Board
2-6. Digital I/O
1) Pin out of digital I/O header (JP7):
Pin No. Function Pin No. Function
1 +5V 2 +5V
3 DIO-O0 4 DIO-I0
5 DIO-O1 6 DIO-I1
7 DIO-O2 8 DIO-I2
9 DIO-O3 10 DIO-I3
11 DIO-O4 12 DIO-I4
13 DIO-O5 14 DIO-I5
15 GND 16 GND
17 DIO-O6 18 DIO-I6
19 DIO-O7 20 DIO-I7
21 +3.3V 22 +3.3V
2) Digital I/O port address:
This function is support by onboard super I/O chip; it can be control easily by
change the register of super I/O chip via I/O port “4Eh” and “4Fh”. Please
see the sample code of below for implement.
Voltage tolerance: +/- 5% with 0V to +5V.
Sample code for input (using Turbo C/C++ 3.0):
#define input_port 0x4f
outportb(0x4e,0x87); //Unlock register
outportb(0x4e,0x87); //Unlock register
outportb(0x4e,0x07); //Set Logic Device number pointer
outportb(0x4f,0x09); //Set Logic Device number
outportb(0x4e,0xF1); // Set active register is CRF1
read_data=inportb(input_port); // Read digital input data
printf("DIO-Input=%02X\n",read_data); //Show digital input data on screen
Register configuration:
Bit No 7 6 5 4 3 2 1 0
Map IN7 IN6 IN5 IN4 IN3 IN2 IN1 IN0