
Originally Posted by
gandora
Now the biggest problem is that using the internal clocks on both the master and the slave makes errors pop up.........
I have one question, would using a lower baud rate decrease the frequency of errors? If you have any suggestions to improve this code, please feel free to through in your two cents. Thanks again!
You aren't going to be able to get away from serial transmission/reception errors when using the internal oscillator. If you were using the hardware UART, you might be able to tweak the baud by using the overrun and framing error bits in the UART itself (overrun generally too slow baud, framing generally too fast baud rate). But overall, if you're not tweaking OSCTUN for each 'F88, it's a crapshoot as to whether or not you oscillator is running near it's spec'd frequency or not, thereby, your SERIAL commands are off by the same amount.
And a lower baud rate might help, but it's certainly not a fix.
Code:
'compare both arrays -- easier to read method I think....
for temp = 0 to 11 : if message[temp] <> message2[temp] then goto baddataout
next temp
serout2 rsoutpin, 16468, [str message\12] 'arrays equal each other
goto picout
baddataout:
serout2 rsoutpin, 16468, ["bad data!"]
goto pcin
Bookmarks