#include <nhietdo.h>
#include <lcd4bit.c>
#fuses HS
#fuses nowdt,noprotect,nolvp,xt,put
#use rs232(baud = 9600, parity = n, xmit = pin_c6, rcv = pin_c7, bits = 8)
int e;
long adc;
char dat;
unsigned int8 nhietdo;
#int_rda
void rda_isr()
      {
      dat = getc();
      
      }
void main()
{
   setup_adc_ports(sAN1);
   setup_adc(ADC_CLOCK_INTERNAL ); 
   set_adc_channel(1); 
   while(TRUE)
   {
      
      adc=read_ADC(); 
      nhietdo=adc*0.49;
      e=dat-adc;
      
   }

}
