August-26th-2019, 07:18 AM
(This post was last modified: May-22nd-2020, 06:56 AM by Armin@netPI.)
We changed the RS-485 transceiver used on module NIOT-E-NPIX-RS485 in REV#2.
The new part - MAX13488E - features auto direction control and is switching between TX (transmit) and RX (receive) mode automatically and instantly once you enabled it by a GPIO. The advantage now is to be no longer compelled to handle switching in software by a non-realtime driver that is causing jitter of the switching times switching from TX mode back to RX mode after a request has been sent. If then a responder is sending back data too fast it could easily happen that the first incoming chars are getting lost if the switching was too long.
The MAX13488E is pin compatible to the previous used transceiver SN65ALS176 in #REV1. Instead of using the TX_EN pin to switch between TX/RX as done before on #REV1 you have now just to set the TX_EN pin to "high" state a single time and automatic direction control gets enabled.
With Node-RED for example you could just inject a "true" to a rpi gpio node directed to GPIO17 (TX_EN) and you are done:
After pulling the TX_EN pin to high state the NPIX-RS485 module will get compatible with any serial communicating program or Node-RED node.
Download the latest NPIX modules documentation highlighting the #REV1/#REV2 modules' difference in the download section here. Please keep also in mind that the used serial port named "Mini UART" used has also restrictions and check if it fulfils your protocol requirements.
Thx
Armin
The new part - MAX13488E - features auto direction control and is switching between TX (transmit) and RX (receive) mode automatically and instantly once you enabled it by a GPIO. The advantage now is to be no longer compelled to handle switching in software by a non-realtime driver that is causing jitter of the switching times switching from TX mode back to RX mode after a request has been sent. If then a responder is sending back data too fast it could easily happen that the first incoming chars are getting lost if the switching was too long.
The MAX13488E is pin compatible to the previous used transceiver SN65ALS176 in #REV1. Instead of using the TX_EN pin to switch between TX/RX as done before on #REV1 you have now just to set the TX_EN pin to "high" state a single time and automatic direction control gets enabled.
With Node-RED for example you could just inject a "true" to a rpi gpio node directed to GPIO17 (TX_EN) and you are done:
Code:
[{"id":"287692d1.c61e06","type":"inject","z":"d31910c1.fd0618","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":295.5,"y":599,"wires":[["6bbb3ed9.4bb6d8"]]},{"id":"6bbb3ed9.4bb6d8","type":"rpi-gpio out","z":"d31910c1.fd0618","name":"","pin":"11","set":"","level":"0","freq":"","out":"out","x":483.5,"y":599,"wires":[]}]
After pulling the TX_EN pin to high state the NPIX-RS485 module will get compatible with any serial communicating program or Node-RED node.
Download the latest NPIX modules documentation highlighting the #REV1/#REV2 modules' difference in the download section here. Please keep also in mind that the used serial port named "Mini UART" used has also restrictions and check if it fulfils your protocol requirements.
Thx
Armin
„You never fail until you stop trying.“, Albert Einstein (1879 - 1955)