![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
bells_electronics
Joined: 05 Dec 2009 Posts: 40
|
Serial Rx Problem |
Posted: Sat Feb 05, 2011 8:10 am |
|
|
hey guys
i have a problem in receiving a string on MC Serial Port,
but my Tx controller is sending data properly i saw it on PC RS232 port,
for tx i'm using this & its work on PC RS232 but i'm not able to receive it on MC port
Code: |
itoa(value,10, string);
puts(string);
putc(10);
putc('\r');
|
|
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9174 Location: Greensville,Ontario
|
|
Posted: Sat Feb 05, 2011 8:52 am |
|
|
You'll have to post a complete, compilable program for anyone to help you.
Will also need compiler version and PIC used. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Sat Feb 05, 2011 11:02 am |
|
|
One possible guess.
If the serial receive, 'sees' data arriving, and your code does not handle it, the receive buffer (only a couple of characters - depends on the PIC), will overflow, and overflow error _will_ be flagged, and the UART _will_ stop receiving data.
Possibility is if you are sending stuff, and the unit at the other send is also sending things, but your code is not actually retrieving this. Hang.
Make sure you have 'ERRORS' in your #USR RS232 line, which will make the compiler add code to clear this error. Consider using a serial receive interrupt, and properly handling the data that is being sent.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|