sleep(1);

}

outp(IO_SCR1,0x00); printf("\n"); for(i=1;i<=0x80;i=i<<1) {

printf("\nCN3: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN3_PA);

outp(RW_8BitDR,i); outp(Act_IOPCR,CN3_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN3_PC); outp(RW_8BitDR,i); sleep(1);

}

printf("\n");

for(i=1;i<=0x80;i=i<<1) {

printf("\nCN4: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN4_PA);

outp(RW_8BitDR,i); outp(Act_IOPCR,CN4_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN4_PC); outp(RW_8BitDR,i); sleep(1);

}

outp(IO_SCR2,0x00); printf("\n"); for(i=1;i<=0x80;i=i<<1) {

printf("\nCN5: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN5_PA);

outp(RW_8BitDR,i); outp(Act_IOPCR,CN5_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN5_PC); outp(RW_8BitDR,i); sleep(1);

}

printf("\n"); for(i=1;i<=0x80;i=i<<1) {

printf("\nCN6: PA=%02xH, PB=%02xH, PC=%02xH, press Q to stop",i,i,i); outp(Act_IOPCR,CN6_PA);

outp(RW_8BitDR,i); outp(Act_IOPCR,CN6_PB); outp(RW_8BitDR,i); outp(Act_IOPCR,CN6_PC); outp(RW_8BitDR,i);

sleep(1);} if(i==0x80) { i=0x01; break; }

if (kbhit()!=0) { c=getch();

if ((c=='q') (c=='Q') c==27 )

return;

}

} /* end of while */

 

PIO_DriverClose();

 

}

 

OME-PIO-D144 User’s Manual (Ver.2.1, Sep/2001)

----- 47

Page 49
Image 49
Omega manual OME-PIO-D144 User’s Manual Ver.2.1, Sep/2001