By lowering the baud rate you're now allowing device B (and SERIN2) twice the time to receive the bits and assemble the byte.
That's probably what's helping a lot more than any line noise issue.
...
Tumbleweed, I had very strong suspicions that the issues were in the communication lines. I changed the Baud rate from 19200 to 9600 and I haven't got anymore wrong data at the receiver. I remember...
Ioannis, yes I'm doing data validation checks all the time. The first byte of the array is always 174. If this condition is not met, then the reading is discarded.
There is no much code to show here. I know device A is sending the right data because I can see it with a logical analyzer. I know device B, like 1 out of 5 times, is reading some bytes wrong because...
Published on - 31st May 2010 17:38
Number of Views: 5542
It's almost Olympics time... so here's a topical program using PBP exclusively (no embedded Assembler) to give you a Stop-Watch with 1/100th Second Timing (yes that's 0.01 of a Second) and gives you REAL-TIME display on your LCD. Now you can do your own timing and challenge the official time...
The program demonstrates using TMR1 in BACKGROUND (multi-tasking), uses PICBasic Interrupts, and accounts for the fact that PICBasic doesn't respond to those Interrupts immediately. There's also a set-Up CALIBRATION menu item, so you can adjust and calibrate your timer to an accuracy of 360mS per Hour.
How does it do all that? Better download the PDF and find out...
Melanie
PS. Questions and Comments post on this forum/thread. No off-list mail please.
Re: SERIN2 Receiving Wrong Data
There is probably a little bit of both. I did a search in the forum, but couldn't find anyone having the same issue.
rsocor01 Yesterday, 23:22