// initialize the a2d readCh(0xFC); // start the second time TR0 = 1; ET0 = 1; // enable timer 0 int EA = 1; CS=1; CLK = 0; // show we're alive send_string("TLV2556 V1.0 07/19/11",1); // Begin program loop while(1) { if( clock_flag ) { clock_flag = 0; getChan(); } // if something received in serial port if( cmd_complete ) processCommand(); } } void getChan() { readCh(0x50); sprintf(st,"chan 5 = %3.3f",dBits * MV_PER_BIT); send_string(st,1); } // ************************************************* // T L V 2 5 5 6 R E L A T E D F U N C T I O N S // ************************************************* void myWait(uchar cnt) { uchar i; for(i=0;i