// experi8a.c extern unsigned get_port(void); main(void) { int x; unsigned port,da1; if(!(port = get_port())) { printf("No board found\n"); exit(0); } da1 = port + 8; printf("This sends 0 to 255 then 254 to 1 to DAC1\n"); printf("as quickly as possible, then repeats.\n"); printf("Both DACs have their grounds on pin 1 of header 1.\n"); printf("DAC1's output is on pin 15 and DAC2's on pin 14.\n"); printf("Press any key to begin, then press any key to end the test.\n\n"); getch(); disable(); while(!kbhit()) { for(x=0; x<256; x++) { outp(da1,x); } for(x=254; x>0; x--) { outp(da1,x); } } enable(); } // end experi8a.c