#include "..\..\Lib\8000E.h" //I-8000 Series Function Call Definition /* This demo program is writted for I-8077 Module,8 Digital Output & 8 digital Input. The I-8077 no have real Digital Output, you can monitor status of digital output on the LED. And you can control the switch to set digital input (High or Low). */ void main() { unsigned int SlotNo,DOdata; unsigned char DIdata; Print("Please Input DO Module Slot Number(0 to 7) =");//Specific the slot number of I-8077. SlotNo = ascii_to_hex(Getch());//MiniOS7 read the slot input. Print(" %d \n\r",SlotNo);//Show the user input. Print("Please Input DO Data(Hex) = "); Scanf("%x",&DOdata);//MiniOS7 read the user keyin the digital output value. Print("DO data = %x\n\r",DOdata);//Show the user input. DIO_DO_8(SlotNo,DOdata);//Function call to execute, set digital output DIdata = DI_8(SlotNo);//Function call to execute, read digital input Print("DI data = %X\n\r",DIdata);//Show the digital input value. }