I'm trying to implement a simple communication between two LPC1765 devices using RS-485. I'm using this example added to my menu system (it's a basic example for LPC17xx):
http://www.codeforge.com/read/155431/rs485.c__html
http://www.codeforge.com/read/155431/rs485.h__html
http://www.codeforge.com/read/155431/rs485test.c__html
So, both devices are properly initialized using RS485Init(). When I send data using RS485Send using a slave address as the first byte, the result is:
(1) if the devices are disconnected, transmitter receives its own communication (the contents of UARTBuffer are updated
(2) if the devices are connected, nothing happens -- transmitted buffer is lost somewhere (UARTBuffer doesn't change)
Now hardware should be properly connected so I'll just list things for reference. There is a U59 SN65HVD1781D driver on RS485_TXD/RXD, there are RS485_OF, RS485_MASTER_PWR and RS485_MASTER_MFAS and a voltage regulator. There is a RS485 slave detect circuit and UP/DOWN connections. Each device is connected with four contacts and they are (I think) RS485_UP, RS485_A+, RS485_B- and RS485_DOWN. There is a 4-pin connector both on top and on the bottom to connect devices in a sequence, where the topmost device would, if everything works, assume the status of a master over all bottom devices.