Software serial at 100K baud

Hello guys,

is there a way to run software serial (Tx+Rx) at a baud rate of 100K? i read that the SW Serial Rx line is limited to 57600bps: https://www.arduino.cc/en/Reference/SoftwareSerial

perhaps there is a better libraray that can do SW Seiral at 100Kbps?

BTW: the reason i dont use HW serial is that i need invert the signals, and hardware can not be inverted (SW can invert). I hope i can do it in Arduino and not need an external inverter chip :)

thanks.

In most situations SoftwareSerial is limited to about 9600 baud. Although you can set the baud rate to 57600 and you can modify the source code to operate near 100k you probably never get a reliable reception at that rate. Even the in sending mode you’re opposite side have to be quite tolerant in timing issues.

For everything above 9600 baud I strongly encourage the use of the HW serial interface to get a reliable communication. Even if that means to add an external inverter chip in your project. Believe me, it’s worth it.

Well, "inverted" serial is usually RS232 standard. You really need an RS232 converter instead of just inverting the signals. The MAX232 line of chips is quite extensive and very useful.

MorganS:
Well, “inverted” serial is usually RS232 standard. You really need an RS232 converter instead of just inverting the signals. The MAX232 line of chips is quite extensive and very useful.

i dont need RS232, i need inverted TTL.

So get a TTL inverter? Like a 7404?

I'm sure that there is a setting deep in the USART control registers that allow you to invert the hardware serial. Finding it in the datasheet would be more work for me than putting a hardware inverter in the circuit.

If you have lots of spare pins on the Arduino, a little fiddling with pin-change interrupts can get you an inversion too.

I'm sure that there is a setting deep in the USART control registers that allow you to invert the hardware serial.

I don't think so. Section 20 clearly states in several places that the Idle state is high, and it looks for low Start bit to start receiving and finishes a transmission with one or two low stop bits.

20.1 Features • Full Duplex Operation (Independent Serial Receive and Transmit Registers) • Asynchronous or Synchronous Operation • Master or Slave Clocked Synchronous Operation • High Resolution Baud Rate Generator • Supports Serial Frames with 5, 6, 7, 8, or 9 Data Bits and 1 or 2 Stop Bits • Odd or Even Parity Generation and Parity Check Supported by Hardware • Data OverRun Detection • Framing Error Detection • Noise Filtering Includes False Start Bit Detection and Digital Low Pass Filter • Three Separate Interrupts on TX Complete, TX Data Register Empty and RX Complete • Multi-processor Communication Mode • Double Speed Asynchronous Communication Mode

Nothing in the features about inverted logic, nothing in the text that follows. 7404 will be quote power hungry, consider 74ACT04 instead, it's also a much better driver, +/-24mA output. http://www.digikey.com/product-detail/en/texas-instruments/SN74ACT04N/296-4351-5-ND/375794

I was hoping to be able to run Futaba SBUS protocol (inverted TTL @ 100k) without a HW inverter. sounds like its impossible. thats a shame - soldering just wires to a pro mini is a much neater solution than adding external chips.

On the GitHub page of the Futaba SBUS Arduino library they recommend an inverter cable. Maybe that works for you?

pylon: On the GitHub page of the Futaba SBUS Arduino library they recommend an inverter cable. Maybe that works for you?

Thank you for the offer. Since Sbus2 is bidirectional, two inverters are needed. Better use an inverter chip in that case.