As i said in subject, im trying to set up serial connection on rx pin (4) and tx pin (7) with non-default config ( I need to use SERIAL_8N2 instead of SERIAL_8N1). I've tried to do it with SoftwareSerial and NewSoftwareSerial but none of those seem to have that argument in .begin() function. I've tried to find other libraries but i was unable to find any other that would solve my problem. Im relativly new to Arduino so i wonder if there is any library/way to do mySerial.begin(19200, SERIAL_8N2) like i would do it with normal serial port ( RX 0, TX 1 )?
Thanks
Receiving with two stop bits is no different than receiving with one stop bit.
The only difference in sending with two stop bits is an extra bit time delay between characters. You can do that by modifying SoftwareSerial.cpp in the SoftwareSerial library:
size_t SoftwareSerial::write(uint8_t b)
{
.
.
.
SREG = oldSREG; // turn interrupts back on
tunedDelay(_tx_delay);
// ADD THIS LINE:
tunedDelay(_tx_delay); // Second Stop Bit
return 1;
}
Thanks, thats exactly what i need :D, i was getting errors on side which was receiving from arduino so i hope this solves it.