// filename DAS.C // test of ADC, MAX549interface // Analog input connected to channel1 // DAC output from MAX549 channel A // real-time sampling at 360 Hz // Last modified 4/12/02 by Jonathan W. Valvano // Copyright 2002 by Jonathan W. Valvano, valvano@uts.cc.utexas.edu // You may use, edit, run or distribute this file // as long as the above copyright notice remains #include "HC12.h" #include "MAX549.H" unsigned char MaxX,MaxX,MinY,MinY,X,Y; unsigned short Count; void GainInit(void){ MaxX = MaxY = 0; MinX = MinY = 255; Count = 0; } void GainMeasure(unsigned char x, unsigned char y){ if(x>MaxX){ MaxX = x; } if(xMaxY){ MaxY = y; } if(y