Praveen Kumar P S
Member level 4
- Joined
- Aug 21, 2014
- Messages
- 79
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 8
- Location
- India
- Activity points
- 627
Hello Guys....
Today i m having a new problem...
Here is my code::
Here my lcd display shows the correct temperature...But when serially transmitted the hyper terminal i used shows random letters like this::
I m using realterm as hyper terminal...i also tried several other..but no effect...
i also run with several baurd rate...but no effect...
thank you..
Today i m having a new problem...
Here is my code::
Code:
#include <18f4550.h>
#device ADC=10
#fuses HS, PLL5, CPUDIV1, NOWDT, NOPROTECT, BROWNOUT, NOLVP, PUT, NOMCLR
#use delay(clock=20000000)
#use rs232(baud=19200, xmit=PIN_C6, rcv=PIN_C7,parity=N,bits=8,ERRORS)
#include<flex_lcd216.c>
void main()
{
float32 T , val;
delay_ms(500);
lcd_init();
lcd_setcursor_vb(1,1);
printf(lcd_putc,"\f ");
setup_comparator(NC_NC_NC_NC);
setup_adc_ports(AN0_TO_AN1);
setup_adc(ADC_CLOCK_DIV_8);
for(;;)
{
set_adc_channel(0);
delay_ms(10);
T=read_adc();
delay_ms(100);
val=T*(4.26/1023)*100;
delay_ms(600);
lcd_gotoxy(1,1);
delay_ms(10);
printf(lcd_putc,"Tem Read:%3.5f ",val);
delay_ms(10);
printf("Tem Read:%3.1f\xDFC",val);
delay_ms(500);
output_toggle(PIN_D1);
delay_ms(10);
output_toggle(PIN_E1);
delay_ms(10);
}
}
Here my lcd display shows the correct temperature...But when serially transmitted the hyper terminal i used shows random letters like this::
I m using realterm as hyper terminal...i also tried several other..but no effect...
i also run with several baurd rate...but no effect...
thank you..