Go Down

Topic: Mods to HardwareSerial to handle 9-bit data (Read 12741 times) previous topic - next topic

philmck

Brilliant, this has saved me a lot of time, many thanks for taking the time to post this. It's great that we can share stuff like this online these days.

dfronin

Ok, I get the Serial.write9bit but how do I set UCSZn = 7  in order to enable 9 bit function? Do have to turn it off in order to send an 8 bit or will Serial.write do the switch?

Sorry for asking such a basic question but I am kind of new at this.

THANKS in advance!

Paul Stoffregen


dfronin


Paul Stoffregen

I guess the version I published for Teensy 3.1, based on Nick's code, but with changes to use Arduino newer Serial.begin(baud, format)... isn't going to help you much.

0miker0

I'm getting an error what says it cannot find Serial.write9bit. Not sure why, I've installed the 9bit library properly.

Mike

PaulS

Quote
I've installed the 9bit library properly.
Obviously, you haven't.

sniffi

#22
Jun 16, 2016, 07:45 am Last Edit: Jun 16, 2016, 08:12 am by sniffi
Hi @ all,

i want use the HardwareSerial document´s from Nick(thank´s Nick for the help) but i must send a framing and overrun error flag with my 16-bit short.

I think it´s the easyest way to set it at bit position 10 and 11, but i´m new at arduino and didn´t know where i must write it in the code. It will be nice when someone can help me and explain where can i change it or what must i do.

with frindly wishes sniffi

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy