SoftwareSerial Library


Is there a library which we can use like Arduino’s SoftwareSerial. We need to port our Arduino program to photon which communicates lots of external PICs.


@mete, there is no equivalent library on the Photon. However, there is one hardware serial port available (Serial1) on the TX/RX pins. Another, Serial2 is only available if hardware mods are done since the GPIO lines are used by the RGB LED.

@peekay123 we already used the serials you have mentioned. Do you know any independent efforts? A library in github etc?

@mete, the problem with SoftwareSerial is that it is very interrupt intensive with the interrupts disabling other interrupts globally for timing reasons. This makes it impractical in the Core and Photon environment.

You could consider UART expander chips like this one:

Four UARTs with a SPI interface at around US$10 in volume.


I have taken the advice to use the MAX 14830 using the SPI implementation. Do you have any experience with this chip? Would you have an example code?

I don’t have anything I can share. The only Arduino related thing I found seems to be started but not all there:

And this thread which is on Particle devices:

Maybe you can contact folks based on this?

I have a library that works well with the SC16IS740/750 in both I2C and SPI modes. It works well with both Gen 2 and Gen 3 Particle devices.


Thanks for the link. In hindsight it seems a bit silly but I have done the hardware dev and boards are manufactured and in my hot little hands. So now for the task of doing the software integration…

The rationale for selecting this particular chip is that we require all 4 UARTS for comms to radars and other devices. We have just migrated from the electron, where this was obviously not an issue, to the B523. From a hardware perspective it seemed a more elegant design to have the one chip handle the UART comms rather than multiple chips.

I can find many references to the MAX14380, including this forum, yet there does not appear to be a working example.