RS485 problems
Posted: Wed Aug 18, 2021 8:20 pm
Do you have any idea what else to try?
The ESP32 WROVER-E based board that I'm using is must use RS485 to talk to another controller.
It has SP485EE IC with all pins controlled individually (no link between DE and RE).
The first byte I'm sending 0xFD goes through, but I'm not receiving the response, although I see that the other side is getting 0xFD and sending proper response.
I connected logic analyzer and I'm hoping that some of you may have an idea what is going on.
logic analyzer is connected like this:
RS485_TXD = DI = CH1 – Data being transmitted and it is 0xFD, just like logic analyzer shows.
RS485_TXEN = DE = CH3 – Driver Enabled – High all the time (This may wrong according to the logic tables below).
RS485_RXEN = RE = CH5 – Receive Enabled – Low all the time, except during data Tx
RS485_RXD = RO = CH7 – Received data – Nothing but a spike (seen as a “framing error”), no data although it is being sent by the other side, after it properly receives the 0xFD byte.
CH9 is not connected to anything
The code uses:
#define PIN_TXD_DI (26)
#define PIN_TXEN_DE (2)
#define PIN_RXEN_RE (19)
#define PIN_RXD_RO (32)
And it sets UART like:
uart_set_pin(UART_NUM_2, PIN_TXD_DI, PIN_RXD_RO, PIN_RXEN_RE, PIN_TXEN_DE)
It also sets mode to UART_MODE_RS485_HALF_DUPLEX
The example in esp-idf (https://github.com/espressif/esp-idf/tr ... echo_rs485) shows RE and DE pins shorted so it is not applicable for the way this transceiver is wired.
Thanks a lot for your time and ideas.
The ESP32 WROVER-E based board that I'm using is must use RS485 to talk to another controller.
It has SP485EE IC with all pins controlled individually (no link between DE and RE).
The first byte I'm sending 0xFD goes through, but I'm not receiving the response, although I see that the other side is getting 0xFD and sending proper response.
I connected logic analyzer and I'm hoping that some of you may have an idea what is going on.
logic analyzer is connected like this:
RS485_TXD = DI = CH1 – Data being transmitted and it is 0xFD, just like logic analyzer shows.
RS485_TXEN = DE = CH3 – Driver Enabled – High all the time (This may wrong according to the logic tables below).
RS485_RXEN = RE = CH5 – Receive Enabled – Low all the time, except during data Tx
RS485_RXD = RO = CH7 – Received data – Nothing but a spike (seen as a “framing error”), no data although it is being sent by the other side, after it properly receives the 0xFD byte.
CH9 is not connected to anything
The code uses:
#define PIN_TXD_DI (26)
#define PIN_TXEN_DE (2)
#define PIN_RXEN_RE (19)
#define PIN_RXD_RO (32)
And it sets UART like:
uart_set_pin(UART_NUM_2, PIN_TXD_DI, PIN_RXD_RO, PIN_RXEN_RE, PIN_TXEN_DE)
It also sets mode to UART_MODE_RS485_HALF_DUPLEX
The example in esp-idf (https://github.com/espressif/esp-idf/tr ... echo_rs485) shows RE and DE pins shorted so it is not applicable for the way this transceiver is wired.
Thanks a lot for your time and ideas.