Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[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
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......
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...
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top