// experi9d.c #include #include #include // defines OC structure #include "outcont.h" // include header with constants #include "constant.h" // include header with external prototypes #include "extern.h" void main(void) { int x; double dc,oldfreq,newfreq; oldfreq = 1193180.0/65536.0; set_up_new_timer(800.0); newfreq = get_frequency(); printf("old frequency = %f new frequency = %fHz\n" ,oldfreq,newfreq); x = (int)InitializeAnalog(); printf("init ana = %X\n",x); for(x=0; x<8; x++) printf("TurnOnAnalog(%d) = %d\n",x,TurnOnAnalog(x)); printf("Press any key to continue. "); getch(); puts(" "); while(!kbhit()) { for(x=0; x<7; x++) printf("%4d",GetChannelValue(x)); printf("%4d\n",GetChannelValue(x)); } // be sure to restore the timer! restore_old_timer(); } // end experi9d.c