How does it at if you just continuously send that '$55-$55-$66-#data' string without any pauses at the transmitter? And get rid of that timeout in the RX code like mister_e said?
Also, if you plan on powering this thing up just once a minute, I wouldn't send the data just once. I'd send it 3, 4, 5, maybe more times in a row and do some comparison checking at the RX end.
You get 3 data in a row that are the same, you got good data, otherwise you throw it out. Or you receive 5 data chunks, 3 match, the other 2 don't, the 3 that match are what you take from it.
Whatever works...in the end, it turns out to be 'Supersonic Protocol version 1.0'.
As far as tuning your OSC...a far out idea that worked for me once a few years ago...(and I was bored and I was thinking back to a lesson my physics teacher taught many many moons ago with a water tank and two egg beaters)...
I generated a 1khz tone with my PC and put it on speaker... I set up the PIC to generate a 1khz tone thru another speaker... Then I listened to both of them at the same time.
If the tones are both at 1khz, they 'beat', and what I hear is constant...
If the tones are 1hz off from each other, I hear an increase/decrease about once per second as they beat and unbeat on each other.
If they're out in the weeds somewhere, it just sounds wierd.
Tweak the OSCTUNE and retried it until they were dead on...took a few days, but I got it...
Then I bought an o'scope...![]()
Bookmarks