Rs232 Micro 1

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include <16f877a.

h>
#device adc=10
#fuses XT,NOWDT,PUT,NOBROWNOUT,NOLVP,NOCPD,NOWRT,NODEBUG,NOPROTECT
#USE DELAY (CLOCK=4000000)
#include <lcd.c>
#USE standard_IO(A)
#USE standard_IO(c)
#USE RS232(BAUD=19200,XMIT=PIN_C6,RCV=PIN_C7,BITS=8,PARITY=N)
INT CN1=0;
INT CN2=0;
VOID MAIN (){
setup_adc(adc_clock_internal);
setup_adc_ports(AN0_AN1_AN3);
DELAY_mS(1500);
WHILE (1){
set_adc_channel(0);
CN1=read_adc ();
set_adc_channel(1);
CN2=read_adc ();
PUTC (CN1);
PUTC (CN2);
DELAY_MS(200);
}
}

You might also like