Go Down

Topic: Arduino Mega hardware serial (Read 350 times) previous topic - next topic

Liad

Hello,

1. Is there any equivalent to the SoftwareSerial inverse_logic function in the hardware serial? [Eg. SoftwareSerial mySerial(2,3,true);]
2. As I see it, in order to change an hardware-serial from 8-N-1 to 8-O-1, all I've got to do is adding:

Code: [Select]
UCSR1C= UCSR1C | B00110000;


after:
Code: [Select]
Serial1.begin(9600);


right? anything else I should add?

Thanks!

Graynomad

#1
Oct 30, 2012, 01:06 pm Last Edit: Oct 30, 2012, 01:08 pm by Graynomad Reason: 1
Quote
As I see it, in order to change an hardware-serial from 8-N-1 to 8-O-1, all I've got to do is adding:

Seems right, unless the library dicks with the register at a later date although

UCSR1C |= B00110000;

is neater.

Quote
Is there any equivalent to the SoftwareSerial inverse_logic function in the hardware serial?

No, unless you count using an external inverter.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

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