/* file name: dom.c, DO signal test */ /* ­×§ïex. of 1.8.2 Digital output method(relay) of iVew ver1.0 */ #include "iview.h" #include "mmi100.h" #include #include #define DO1 0x100 #define SCAN1 0x101 #define SCAN2 0X102 #define LED 0x103 #define DIN 0x104 #define DOUT 0x105 void main() { int y=1, quit=0; char c; InitLCD(); Print("IVIEW 100: Two Relay outputs test.\n\r"); while(!quit) { outp(DOUT,0x1f); //R1 ACTIVE Print("\n\rRelay 1 active , "); Getch(); outp(DOUT,0x2f); //R2 ACTIVE Print("\n\rRelay 2 active , "); Getch(); Print("\n\rboth Relay off , "); outp(DOUT,0x00); c=Getch(); if( c=='q' || c=='Q') quit=1; } CloseLCD(); }