Hi everyone,
I have some devices that are communicated through RS485. nRF52840 DK supports RS485 communication?
Do you have suggestions of how should I connect those devices with nRF52840?
Thanks in advance
Nick
Hi everyone,
I have some devices that are communicated through RS485. nRF52840 DK supports RS485 communication?
Do you have suggestions of how should I connect those devices with nRF52840?
Thanks in advance
Nick
Hi Nick
The scope of the UART on the nRF5x is simple point to point (RS232) serial communication, not the industrial standards for multidrop and serial networks (RS422, RS485). Nordic does therefore not offer any examples or solutions with RS485.
There are multiple other threads here on the DevZone regarding RS485 support on the nRF52 series. Unfortunately, we don't have support implemented in the SDK, but you can check out this thread for a suggestion by another user on how this can be done.
Other suggestions: You might be able to use an Enable pin and blocking mode in order to solve this, although it's not a very elegant solution. You can configure the "driver" pins as inputs in this case. Set them up as inputs, change them to outputs before transmitting, then set them back to inputs when the transmission is complete.
Best regards,
Simon
I'm sorry to disturb you, so I want to know whether you have solved this problem now. The RX TX on NRF52840 cannot be directly connected to the RO DI pin of MAX485 chip, right? So what's the solution? Looking forward to your reply
Use the same supply (VCC and GND) for the MAX485 and the nRF52840 (typically 3 volts) and then the pins can be connected directly together (nRF52840 Rx to MAX485 R0, Tx to DI. IO pins control /RE and DE, again direct connection.
My NRF52840 is powered by 1.8V voltage. How can I communicate with MAX485? I have thought of using ilM2881-5 RS485 chip that is compatible with 1.8V voltage when I consulted the data, which is compatible with 1.8V voltage for transceiver. I wonder whether this scheme is feasible. If it is feasible, can THE RX TX of NRF52840 be directly connected with the RO DI pin of LTM2881 chip? How to determine the control pins in NRF52840? Looking forward to your reply https://www.analog.com/media/en/technical-documentation/data-sheets/2881fj.pdf
Yes; as long as both RS485 and nRF52840 VCC and GND are the same then direct connections are ok. 1.8 volts on both is perfectly ok.
As an aside, the internal core runs at 1.3 volts so the external voltage (1.8 volts in your case) is typically stepped down with the on-board DC-DC convertor from 1.8 volts to 1.3 volts. Were you to use an external 3 volt supply, the 3 volts would be stepped down to 1.3 volts in the same manner but note the overall power consumption would be the same in both cases as fewer mA would be required at 3 volts than at 1.8 volts. The only difference would be if other devices on VCC consumed more power at 3v instead of 1.8v. You can ignore this comment, but this is often overlooked and if you happened to be using a 3.3 volt coin cell then an external 1.8 volt regulator is often pointless.
The /RE and DE can be controlled by any two i/o pins; they can also be connected together and controlled by a single i/o pin. The only reason to use 2 pins is if you want to listen (validate) your own transmission. My other post (link above) shows how to do this. See rs485-transmit-enable
Edit: I should add that RS485 allows very high baud rates. For symmetric transmit and receive baud rates the nRF52840 only allows up to 1MBaud, but if you can accept asymmetric baud rates you can use higher baud rates on transmit (eg 4MBaud) while only allowing 1MBaud on receive. If that is of interest I can post details.