
/*
PCM- AIO
This pro gram was writ ten Pri mar ily as a test/setup pro ce dure
for the PCM- AIO board. (400- 0172- 000)
It also dem on strates how to ac cess the MAX180 part,
and shows vari ous meth ods of ac cess ing the part.
Use get conv() for real- time read ings in the fore ground.
Use the In ter rupt driven method to pro vide an ar ray im age
of all eight chan nels, con stantly up dated in the back ground.
Date: 05- 22- 1992.
Author: John Kel ler
Copy right 1992 by Win Sys tems. All Rights Re served.
*/
#in clude <stdio.h>
#in clude <dos.h>
#in clude <stdlib.h>
#in clude <graph.h>
void (_in ter rupt _far *OldTmr)(void);
/* Pointer to old ISR */
void (_in ter rupt _far *TmrPtr)(void);
/* Tem po rary ISR Pointer */
void in ter rupt Int1c(void);
/* Dec la ra tion on ISR */
void (_in ter rupt _far *OldRq5)(void);
/* Pointer to old ISR */
void (_in ter rupt _far *Rq5Ptr)(void);
/* Tem po rary ISR Pointer */
void in ter rupt Int0d(void);
/* Dec la ra tion on ISR */
un signed int ticks[5],convi;
un signed int tar[8] = {0x000,0x924,0x249,0xb6d,0x492,0xdb6,0x6db,0xfff};
main()
{
int a,b,c;
for(a=0; a2;a++)
printf(“ \n”);
_set text po si tion(1,1);
printf(“Test for PCM- AIO boards\n”);
printf(“ To set up the board, con nect the Volt age Source to the points\n”);
printf(“ in di cated on the test fix ture and set for 4.998 Volts.\n”);
printf(“ Ad just R3 on A/D un til chan nel 0 %'Read%' is switch ing be tween 0 & 1.\n”);
printf(“ Next, Ad just R2 on A/D un til chan nel 7 %'Read%' is FFE.\n”);
printf(“ In crease to 5.000 Volts. Ch 7 %'Read%' should now be FFF. Ch 0 %'Read%' should\n”);
printf(“ still be be tween 0 and 1.\n”);
printf(“ All chan nels should dis play PASS. You should NOT see the mes sages\n”);
printf(“ %'I nte rrupt Failed%', or %'Busy is Stuck%' be low the chan nels.\n”);
OldRq5 = _dos_get vect(0x0d);
OldTmr = _dos_get vect(0x1c);
TmrPtr = Int1c;
Rq5Ptr = Int0d;
_dos_set vect(0x1c,TmrPtr);
_dos_set vect(0x0d,Rq5Ptr);
980723
OPERATIONS MANUAL PCM-AIO
Page 2-7
WinSystems - "The Embedded Systems Authority"
Summary of Contents for PCM-AIO
Page 21: ...5 APPENDIX A MAX180 DATASHEET REPRINT ...
Page 22: ......
Page 23: ......
Page 24: ......
Page 25: ......
Page 26: ......
Page 27: ......
Page 28: ......
Page 29: ......
Page 30: ......
Page 31: ......
Page 32: ......
Page 33: ......
Page 34: ......
Page 35: ......
Page 36: ......
Page 37: ......
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......