[moved] Serial communication PC and PIC16F876A

Status
Not open for further replies.

Harith Anuradha

Newbie level 1
Joined
Jun 28, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
11
Need Help....
I tried to communicate with my laptop by connecting USB to Serial converter(i checked it.it's working) and my demo board for 16F876A..
there i used MAX232...
im using CCS C compiler to coding.....

i need to send some data to PIC and display it on LCD display and reply to PC....
but after getc and gests commands it is not coming to next line....
why is that????
LCD is working before that command...
i tried it in many ways but cant find what is the wrong... pls help me...

this is part a of code i used...
Code:
{
char string[30];

gets(string); // read string from serial
printf(lcd_putc,"\f"); // clear lcd
printf(lcd_putc,"%c",string); // print string in LCD
puts(string); // write string to serial
}
pls help me...
 
Last edited by a moderator:

is it interrupt driven or polling???
if polling then this problem may cause.
 

First of all, check out your code is working or not by connecting to the computer via serial port, then go for usb to serial...
If it works with serial port definitely will works for usb serial converter....
and check out the baudrate, stop and parity bits......
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…