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.

PIC microcontroller RS232 communication help

Status
Not open for further replies.

amiteshb

Newbie level 2
Joined
Mar 1, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,302
pic microcontroller rs232

My project involves working on a PIC16F877A and I’m having problems wrt serial communication.
The microcontroller displays some temperature data on the LCD. I’m trying to get it to display the same on a PC through the RS232 line. I’m using CCS-PIC (an embedded C compiler).
When I write a simple program to just transfer a sentence (in an infinite while loop), the sentence/data is displayed on the PC (I’m using a basic C program to display on the PC end). Although even this is not perfect, since every time I touch the RX/TX pins on the PIC board, it displays junk on the PC end, but gets back to normal after 2-3 seconds. Additionally, I’m also using a signal generator input into C.0. Every time I switch on the signal gen, the data being displayed on the PC becomes junk. It returns to normal when I switch off signal gen . Is this some kind of noise problem?
In the MCU, port C- pin 6 & 7 are TX & RX .
Now the main problem comes up when I try to integrate it with the rest of my program (which is quite lengthy, about 700 lines). I’v written the full program with intent to display whatever is being sent to the LCD, to be sent to the PC too. I’m just using printf statements to send to PC. However, it displays only junk.
Is this happening because PORT C cannot be used for both peripherals (RS232 and signal gen input)?
If any of you have worked in a similar situation like this, I sure would appreciate your help.
 

pic rs232 communication

try using max232
 

pic rs232

I did . It wouldn't at all work otherwise.
 

pic and rs232

well , it seems that ur connections are not proper .how did u prototype it . can u post RS232 section circuit.
 

rs232 microcontroller

Hello

Perhaps an ground problem regarding connection to your com port.

The symptoms is similar to a missing ground betwen circuit and your pc.

Regards
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top