Page 1 of 1

Still Having problems with Uarts

Posted: Sun Jul 21, 2013 8:49 pm
by jethronull
Hi Guys,

Looking back over posts for problems with Uarts seems like I posted half of them. I did finally get things stable and workable, but I have changed the schematic a little, just changed pins definitions and increased to larger processor in the same family. Now I have serial issues again. The processor reboots on about 50% of incoming serial data. I can disable the decoding code and it still crashes so I am sure it is the ReceiveRS232Char() itself. The serial interrupts still throws up warnings of potential stack corruption due to the delay_us thing thing but I have confirmed that this is not the culprit because I still crashes when put ReceiveRS232Char() in the main loop diable the interrupt routine. Out of curiosity (or desperation) tried using ReceiveRS232String(), same thing, and even tried switching to software Uart to see if it was something to do with the PIC - nope, still crashes.

Really hoping you can see the problem or think of a workaround. Thanks chaps.

Jon

Re: Still Having problems with Uarts

Posted: Sun Jul 21, 2013 8:57 pm
by brandonb
hopefully this is not the problem but i was looking to get this chip and noticed that in the erratica datasheet it says
The EUSART asynchronous operation
may miss the Start bit edge.
LSb of transmitted data can be corrup
http://ww1.microchip.com/downloads/en/D ... 80514E.pdf

Re: Still Having problems with Uarts

Posted: Mon Jul 22, 2013 9:25 pm
by jethronull
Mea Culpa ! I found the problem, not software at all. The power supply section had the wrong chip which wasn't delivering the required current which allowed the rails to be pulled down when the RF module received a message (which went to the PIC). Sorry guys, should have tested the hardware first.

Brandon, thanks for the heads-up. That's a pretty disturbing admission by Microchip. I'll have to watch out for that.

Jon