Hi, everyone.
I plan to build an device capable to transmit signal from strain gauge to PC using UART function of PIC16F877.
my c code is as follow:
#include <16f876.h>
#fuses hs, noprotect, nowdt, brownout, nolvp
#device adc=10
#use delay (clock=20000000)
#use rs232 (baud=96500, xmit=PIN_C6, rcv=PIN_C7, parity=N)
#byte PORTA=5
#byte PORTB=6
#byte PORTC=7
void main()
{
int value;
setup_port_a(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
set_adc_channel(0);
do
{ value=read_adc();
value = getc();
printf("%2x/n/r",value);
}
while(TRUE);
}
And i also have no idea to read my signal coming out from RS232 in PC.
Is there any freeware to read signal of most form from rs232?
Is my C code correct?
Thanks for any help , advice. very appreciate it.
beum.
I plan to build an device capable to transmit signal from strain gauge to PC using UART function of PIC16F877.
my c code is as follow:
#include <16f876.h>
#fuses hs, noprotect, nowdt, brownout, nolvp
#device adc=10
#use delay (clock=20000000)
#use rs232 (baud=96500, xmit=PIN_C6, rcv=PIN_C7, parity=N)
#byte PORTA=5
#byte PORTB=6
#byte PORTC=7
void main()
{
int value;
setup_port_a(ALL_ANALOG);
setup_adc(ADC_CLOCK_INTERNAL);
set_adc_channel(0);
do
{ value=read_adc();
value = getc();
printf("%2x/n/r",value);
}
while(TRUE);
}
And i also have no idea to read my signal coming out from RS232 in PC.
Is there any freeware to read signal of most form from rs232?
Is my C code correct?
Thanks for any help , advice. very appreciate it.
beum.