/* 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++) | /* PA/PB/PC | */ |
{ | /* select the active port */ | |
outp(wBase+0xc4,jj); | ||
printf("\nSelect | /* D/O=0x55 | */ |
outp(wBase+0xc0,0x55); | ||
printf(", D/O=0x55"); getch(); | /* D/O=0xAA | */ |
outp(wBase+0xc0,0xAA); | ||
printf(", D/O=0xAA"); getch(); |
|
|
outp(wBase+0xc0,0x1); getch(); | /* PA0/PB0/PC0 | */ |
outp(wBase+0xc0,0x2); getch(); | /* PA1/PB1/PC1 | */ |
outp(wBase+0xc0,0x4); getch(); | /* PA2/PB2/PC2 | */ |
outp(wBase+0xc0,0x8); getch(); | /* PA3/PB3/PC3 | */ |
outp(wBase+0xc0,0x10); getch(); | /* PA4/PB4/PC4 | */ |
outp(wBase+0xc0,0x20); getch(); | /* PA5/PB5/PC5 | */ |
outp(wBase+0xc0,0x40); getch(); | /* PA6/PB6/PC6 | */ |
outp(wBase+0xc0,0x80); getch(); | /* PA7/PB7/PC7 | */ |
} |
|
|
PIO_DriverClose();
}
This demo program is designed for CN1 ~ CN6. The user can install an OME-
If the
If the
If the
If the
If the
If the
Then this demo program will test D/O of PA, PB and PC sequentially.
|