Multiple serial displays

Hello, I'm trying to use the New SoftSerial library to control multiple 7 segment serial displays ( SparkFun 7-Segment Serial Display - Red - COM-11441 - SparkFun Electronics ) with an Arduino pro mini. My problem is I'm out of pins.

I know the typical serial usage involves TX and RX, but I only require TX to these displays. So is there a way to setup SoftSerial with only a TX pin. Or can I set multiple SoftSerial instances with the same RX pin to reduce the number of pins used?

Another option is to use a MUX to control one SoftSerial line, but that's not ideal as it adds an additional control layer.

So, what would be the best way to go about this.

What you could do is make a stripped version of the NewSoftSerial lib that is output only. I looked into that once too, not because I was out of pins, but to preserve memory. Solved the mem problem by stripping some long display strings. And of course when you do so a Receive only lib is not far away.
It would be nice to patch NSS lib with #ifdef's to "mod" its behavior.

That's an idea that could work. I didn't think to strip a copy of the library down.

Thanks for the idea.

I haven't used the library enough to know this myself. Why can't you just define multiple devices, defining them all with the same RX pin?

Why can't you just define multiple devices, defining them all with the same RX pin?

Good idea too; should be tested.

Drawback is that the lib allocates memory (buffer) for every Rx port, don't know the number of serial display's Erk want to connect lets say 10 that implies 10 unused buffers (etc). Thought the size can be trimmed with just one define.

Good idea too; should be tested.

Drawback is that the lib allocates memory (buffer) for every Rx port, don't know the number of serial display's Erk want to connect lets say 10 that implies 10 unused buffers (etc). Thought the size can be trimmed with just one define.

I just tried this with three instances all sharing the same RX pin, each additional instance defined with the same RX pins added 54 bytes. This looks viable if you have the space.

Each instance put out a TX signal just fine.

54 bytes is not much, but it still adds up. Did you try the opposite too, multiple Rx and one Tx (just for sake of the experiment?)

Mailed to Mikal Hart, the creator of the NSS lib and he replied there was even an easier way to do it. So Erk, another testcase for you :slight_smile:

Even easier: just use the current lib but designate the RX pin as -1:

NewSoftSerial nss(-1, 3);

Mikal

Thanx Mikal,

Awesome, I was kinda having the same thoughts on assigning a pin that was nonexistent, but I didn't know I could use a negative number.

Just a note on the above TX byte figures, each instance had an accompanying Serial#.begin and Serial#.print(#) command.

For the RX test I didn't have any additional commands outside of defining the serial instance and serial#.begin commands. Each instance only added 38 bytes