PIC micro uart puzzle

May 31, 2010 2 Replies

Can anyone suggest why the following is happening?



I have two Pics, a '690 and a '2455, communicating via eusart (8-bit). After a succesful round of query/response, the '690 transmits (confirmed on scope), but the '2455 doesn't receive.



'690 '2455 ---- ----- . MOVWF TXREG BTFSS PIR1, RCIF . GOTO $-1 . MOVWF TXREG BTFSS PIR1, RCIF . GOTO $-2



; things work well up to here. ; successful comm is displayed



. BTFSS PIR1, RCIF . GOTO $-2



; a delay, up to several seconds, occurs



MOVWF TXREG .



; and here the 690 xmits, but the 2455 ; stays in the loop...



I could see a config problem if there was no comm at all, but why work and then stop? All suggestions gratefully accepted.


Clear the recieve buffer? It may be full and hence it can't recieve any more messages until cleared.

Does it depend on the specific msg type? Try various messages or all messages and see if any get through. If some get through then probably a config problem.

Not sure on the pic16's but your recieve buffer may not be configed properly.

The clocks may be out of sync causing some problems.

Check the errata as I recall some issues with the uart module.

"Randy Day" schreef in bericht news: snipped-for-privacy@news.sasktel.net...

Having ome experience with PICs I guess you have to reset some flag (PIR1 maybe?) after reading the received data otherwise the UART does not accept new data. Beware. Small differences may cause big problems. You'll have to check the datasheet of the 2455 including the errata to hope to be sure to have 100% reliable data.

petrus bitbyter

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required