Software Serial

Posted on
  • Espruino presently does not have software serial functionality.

    I remember Gordon having mentioned supporting this (along with possibly software I2C), as an extension of how we can currently do software SPI. UART is trickier though, because of the importance of timing, that the fact that you need to track the incoming data with interrupts.

    Where does implementing software serial sit in the priority pile? I would consider it to be acceptable if the Espruino blocked while sending (and I guess receiving would be tricky too in this regard). I think it's fine if the software serial is gimped (low or limited baud rate options), we just need something.
    The pico is kinda starved for serial ports, particularly now that we're using one of them to get internet - ST's decision to put UART6 on the same pins as USB is unfortunate....

  • Hard to say where it sits in the priority list - I definitely want to do it, but it does sit behind USB HID which I promised as a KickStarter stretch goal.

    Serial TX should be pretty easy to handle in pure JavaScript. The way you can pass arrays into digitalPulse means you should actually be able to get a decent bit rate out of it.

    On the RX side, low bit rate can be done in JavaScript right now - at a guess I'd say 2400 tops though! Since you can now execute native code in an interrupt, it shouldn't actually be a big deal to add it as a library (in fact the decode logic already exists as part of this) - it's just a matter of getting time to put it in and test it :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Software Serial

Posted by Avatar for DrAzzy @DrAzzy

Actions