LPC176X RS485 does not always work

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC176X RS485 does not always work

1,616 次查看
Ronaa
Contributor II

We want to use LPC1765 UART1 as RS485 interface and let the HW manage the TX/RX enable line

When we connect it to a PC via RS485-USB interface, using PC terminal  we can transmit and recive and its working fine.

When we try to connect it to another device,  the other device does not recognize our communication, even though the data is received.

We changed the interface from RS485 UART to simple UART + GPIO for TX/RX enable line and it works ok.

Any idea what can be the cause?

We see timing differences between the 2 communications configurations but since it is working with the PC with both of them, it seems that HW or configuration is not an issue.

 

Thanks  

0 项奖励
回复
2 回复数

1,586 次查看
frank_m
Senior Contributor III

RS485 is basically the same signals like RS232, only a different physical layer and different signal levels.
Which suggests the transceiver hardware on your LPC1765 board is not right. Perhaps the voltage level is not sufficient.

An example from the RS232 side :
You can often connect the UART Rx and Tx pins of a MCU board with 3.3V supply directly to a PC serial line, and the MCU would be able to receive data from the PC. The other direction did not work, because the 3.3V Tx level was insufficient.

I would suggest to check the transceiver signal levels with a scope.

 

0 项奖励
回复

1,596 次查看
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

As you said that RS485 UART can communicate to PC with or without GPIO, it means the software/hardware are okay. But the RS485 UART can not communicate to another device.

1)Pls check the baudrate, if you reduce the baud rate, it is okay? I means that the bit width of  uart and another device uart must match.

2)Pls try to add a delay

xiangjun_rong_0-1710903179341.png

Hope it can help you

BR

XiangJun Rong

 

0 项奖励
回复