NeoSWSerial icon indicating copy to clipboard operation
NeoSWSerial copied to clipboard

What are the compatibility gotchas between NeoSWSerial, NeoHWSerial, and NeoICSerial?

Open eclab opened this issue 2 years ago • 0 comments

According to Paul Stoffregen, [New]SoftwareSerial was sort of compatible with AltSoftSerial and with Serial only with carefully chosen baud rates. And I know that you posted this explanation of the relationships between Serial, AltSoftSerial, and NeoSWSerial. However I see you also posted a somewhat confusingly different description of the relationship here. Is there an official or formal description, and how does it extend to NeoHWSerial and to NeoICSerial?

Specifically, my situation is this:

  • I want to receive on one port and and to transmit on one, ideally on a couple of ports. I'm at 31250.

  • I need a few configurations. In the first configuration, I can receive (but not transmist) via HW. Everything else must be bit-banged. In a second configuration, I cannot use HW at all, but I can receive via AltSoftSerial (Pin 8) but cannot transmit (Pin 9 not available). In a third configuration, I can't use HW, Pin 8, or Pin 9.

You had said: "NeoSWSerial ... can be used with the above choices, but transmitting on NeoSWSerial prevents them from receiving." Does this mean that I can't reliably RX on HW (or AltSoftSerial) and TX on NeoSWSerial?

Thus I'm trying to determine (1) if I can use NeoHWSerial RX with NeoSWSerial TX, and how many TX I can do, (2) if I can use NeoICSerial RX with NeoSWSerialTX, and again how many TX I can do, and finally (3) if I should just use NeoSWSerial for everything, and how many TX I could do. And I preume I shouldn't be doing processing, then retransmitting, inside NeoSWSerial's RX hooks.

eclab avatar Dec 22 '23 00:12 eclab