home *** CD-ROM | disk | FTP | other *** search
- /*
- * MAC Version 2.0 Author : Vincent Hayward
- * School of Electrical Engineering
- * Purdue University
- * Dir : mac
- * File : adc.c
- * Remarks : only a test program for the analog to digital converter
- * Usage : cross compile and link with vec.o trap.o
- */
-
- #include "../h/adc.h"
- #include "../h/which.h"
- #include "../h/addefs.h"
- #include "../h/jcom.h"
- #include "../h/stdio11.h"
- main()
- {
- short n, j, d[16];
-
- setbuf(stdin, NULL);
- setbuf(stdout, NULL);
-
- while (!getio(ARMPWR))
- ;
- bicio(ARMPWR);
- bisio(ARMPWR);
- put6pg(MODE, MESERVO|MEPOSSV);
- for (; ; ) {
- for (j = 0; j < 16; ++j) {
- ADCV(d[j], j);
- }
- for (j = 0; j < 16; ++j) {
- printf("%o\n",d[j]);
- }
- printf(
- "\n------------------------------------------------------------------------\n"
- );
- n = 30000;
- while (n--)
- ;
- }
- }
-
-
- zexit(n){
- printf("\nexit %d", n);
- }
-