![Quanmax KEEX-5100 Series User Manual Download Page 53](http://html1.mh-extra.com/html/quanmax/keex-5100-series/keex-5100-series_user-manual_3444184053.webp)
Appendix A
53
KEEX-5100 Series User’s Manual
Appendix A
DIO (Digital I/O) Sample Code
//***************************************************************
//KEEX-5100 DOS DIO sample program
//Please compile with Turbo C 3.0 to utilized the program
//0:Low 1:High
//DO_1: IOport 0x1EC3 bit8
DI_1: IOport 0x1F0B bit7
//DO_2: IOport 0x1EDB bit8
DI_2: IOport 0x1F1B bit7
//DO_3: IOport 0x1E7B bit8
DI_3: IOport 0x1F23 bit7
//DO_4: IOport 0x1D73 bit8
DI_4: IOport 0x1F2B bit7
//***************************************************************
int main()
{
int RetVal;
int i;
int Temp, Temp1, Temp2, Temp3, Temp4;
//Clear DO_1~4
RetVal=inp(0x1EC3);//IO Port: 0x1EC3
RetVal=(RetVal & 0x7F);
outp(0x1EC3,RetVal);//Setting DO_1 Low
RetVal=inp(0x1EDB);//IO Port: 0x1EDB
RetVal=(RetVal & 0x7F);
outp(0x1EDB,RetVal);//Setting DO_2 Low
RetVal=inp(0x1E7B);//IO Port: 0x1E7B
RetVal=(RetVal & 0x7F);
outp(0x1E7B,RetVal);//Setting DO_3 Low
RetVal=inp(0x1D73);//IO Port: 0x1D73