// filename adtest.C // Test of 6812 8-bit ADC // 1 Hz sampling and output to serial port // Last modified 12/12/02 by Jonathan W. Valvano // Copyright 2003 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 "SCI12.H" void CycleWait(unsigned int delay){ int Endt; Endt = TCNT+delay; /* Time (125ns cycles) to wait */ while((Endt-(int)TCNT)>0); /* wait */ } //******** SecWait *************** // wait 1 second, using TCNT void SecWait(unsigned int sec){ unsigned int i,j; for(i=0; i