Serial Flow Control

Posted on
  • Dear Espruinos

    I use several picos with an xbee modul to communicate to each other.
    I only connected power and rx/tx. So there is no flow control used.

    Maybe as a result, when i communicate faster than 2400bps i have data losses.

    I would like to test it with flowcontrol. Do the pico support HW flowcontrol ?

    Thanks for your advise

    Sacha

  • I know that there is xon/xoff flow control, but did not see any option that you could specify pins for HW flow control - see reference Serial_setup

  • Thanks. As far a i know the xbee modules only supprts HW flow control.
    @Gordon: What about HW flowcontrol ?

  • Conveniently, it was something I added last week and which will be in 1v93! If you use one of the cutting edge Espruino builds (newer than 1v92) then it should have it.

    If you do:

    Serial.setup(9600, {rx:..., tx:..., cts: ...});
    

    Then Espruino will set the CTS pin to 0 whenever it is ready to receive data, and to 1 whenever it is too busy to receive. It doesn't do flow control on transmit, but I imagine that is unlikely to be your problem with xbee modules.

    Hope that helps!

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

Serial Flow Control

Posted by Avatar for Sacha @Sacha

Actions