Omega OME-PIO-D144 Hardware Manual page 40

Pci-bus digital i/o board
Table of Contents

Advertisement

/* CN1 : K=0/1/2
/* CN2 : K=3/4/5
/* CN3 : K=6/7/8
/* CN4 : K=9/10/11
/* CN5 : K=12/13/14
/* CN6 : K=15/16/17
printf("\nk="); scanf("%d",&k);
for (jj=k; jj<(3+k); jj++)
{
outp(wBase+0xc4,jj);
printf("\nSelect Port-%d",jj);
outp(wBase+0xc0,0x55);
printf(", D/O=0x55"); getch();
outp(wBase+0xc0,0xAA);
printf(", D/O=0xAA"); getch();
outp(wBase+0xc0,0x1); getch();
outp(wBase+0xc0,0x2); getch();
outp(wBase+0xc0,0x4); getch();
outp(wBase+0xc0,0x8); getch();
outp(wBase+0xc0,0x10); getch();
outp(wBase+0xc0,0x20); getch();
outp(wBase+0xc0,0x40); getch();
outp(wBase+0xc0,0x80); getch();
}
PIO_DriverClose();
}
This demo program is designed for CN1 ~ CN6. The user can install an OME-
DB-24C into CN1 ~ CN6 of OME-PIO-D144. This demo will request the user to
input a number K as following:
If the OME-DB-24C is installed in CN1
If the OME-DB-24C is installed in CN2
If the OME-DB-24C is installed in CN3
If the OME-DB-24C is installed in CN4
If the OME-DB-24C is installed in CN5
If the OME-DB-24C is installed in CN6
Then this demo program will test D/O of PA, PB and PC sequentially.
OME-PIO-D144 User's Manual (Ver.2.1, Sep/2001)
--> key in 0
*/
--> key in 3
*/
--> key in 6
*/
--> key in 9
*/
--> key in 12 */
--> key in 15 */
/* PA/PB/PC
/* select the active port */
/* D/O=0x55
/* D/O=0xAA
/* PA0/PB0/PC0
/* PA1/PB1/PC1
/* PA2/PB2/PC2
/* PA3/PB3/PC3
/* PA4/PB4/PC4
/* PA5/PB5/PC5
/* PA6/PB6/PC6
/* PA7/PB7/PC7
*/
*/
*/
*/
*/
*/
*/
*/
*/
*/
key in 0
key in 3
key in 6
key in 9
key in 12
key in 15
*/
---- 38

Advertisement

Table of Contents
loading

Table of Contents