Hi, I'm new to trying to change the default serial comms - but I have some Hamilton precision pumps which are locked to 1 start bit, 7 data bits, odd parity and one stop bit - what is the quickest way to achieve this to insert into in a script - I've looked at a few posts, but there isn't one that really makes it clear.
Also - is it possible to have different serial settings on the different UART hardware serial ports on an Atmega 1280?
What do you mean by a "script"? Do you mean a sketch?
The predefined Serial object doesn't have a way to change the word size and parity so you will have to write code like:
Serial.begin(9600 /* or whatever */);
UCSR0C = (3/*odd parity*/ << 4) | (2/*7-bit words*/ << 0);
For the other serial ports, you would write to UCSR1C, UCSR2C, etc.
--
Need a custom shield? Let us design and build one for you.
you can do the parity yourself in software, and voila, 7,o,1 without any changes.