What version of the IDE are you using? 1.0.3 (I think) added an optional second argument to the Serial.begin() method that allows tailoring of bits and parity.
Thanks for responding so quickly! I have IDE V 1.0.4. I looked into the Serial.begin(speed); command but found no further parameters to add.
Your suggestion makes sense. Adding additional parameters to the Serial.begin command also makes perfect sense.
I'll start a search for further info based on that.
Thanks!
p.s. Unrelated: Sorry to hear about the bridge collapse in WA. Aside form the injuries, it can't be good for travelers and daily commuters.
JayStel:
Thanks for responding so quickly! I have IDE V 1.0.4. I looked into the Serial.begin(speed); command but found no further parameters to add.
Your suggestion makes sense. Adding additional parameters to the Serial.begin command also makes perfect sense.
I'll start a search for further info based on that.
Thanks!
p.s. Unrelated: Sorry to hear about the bridge collapse in WA. Aside form the injuries, it can't be good for travelers and daily commuters.
The details of setting addition serial parameters (as of 1.0.4) are in the arduino reference for serial.begin:
There are serial config parameters as you explained. Unfortunately for me, the syntax has no example and makes no sense.
Here is what I understand from that document:
Serial1.begin(9600,SERIAL_7N1); // Should give me 9600,7,E,1,
I tried it in the Sketch and it did in fact compile and upload to the MEGA without errors. It will be a few hours before I can test it on the actual serial device (BetaBrite LED scrolling display). But I will post the results here.
WOW. That sure is soo much easier than setting the config registers..
There are serial config parameters as you explained. Unfortunately for me, the syntax has no example and makes no sense.
Here is what I understand from that document:
Serial1.begin(9600,SERIAL_7N1); // Should give me 9600,7,E,1,
I tried it in the Sketch and it did in fact compile and upload to the MEGA without errors. It will be a few hours before I can test it on the actual serial device (BetaBrite LED scrolling display). But I will post the results here.
WOW. That sure is soo much easier than setting the config registers..
Thank you, very much!
Much regards,
John
No, Serial1.begin(9600,SERIAL_7N1); // would give you 7= seven data bits, N= no parity bit, 1= one stop bit
Serial1.begin(9600, SERIAL_7E1); // would get you 7 data bits, one even parity bit, one stop bit.
Lefty - Yup. I caught that when typing it in. It is set for 7E1.
Unfortunately, it did not work. I put the sketch back on the UNO, using the appropriate commands - setting the Config register for UART etc. And it works again.
The debug-status println commands in the sketch (to monitor progress) do show up on the Terminal Monitor(via USB). I have a Commitment until 9:30Eastern and will pick it up after that. Must be a type-O in my sketch. Other than the one you pointed out. That was fixed.
REgards,
John
(I edited this post to fix a confusing sentence (20:51 Eastern)