PORTS Forum

Ports and Interfaces => Serial Ports => Topic started by: Hardy on July 20, 2013, 01:05:24 pm

Title: Configuration of UART for RS485 Master or Slave
Post by: Hardy on July 20, 2013, 01:05:24 pm
Hi everybody;

I have been trying to set up an RS485 network using dsPIC30F as Master and three PIC 16F as Slaves. I am stuck at the configuration of the master and slaves. Shall I make it 9-bit data format (Set Address Detect Bit) or just 8-bit data format. I have looked at the code posted by Jan in my example code but there is no mention to the 9_bit data format and I couldn't find the Primary Node code which is starting the communication. Is it compulsory to use  TX9D/RX9D  or we can use the normal 8_bit as address is written in software. Does somebody have  a good config routine for UART for RS485 Master or Slave or the code for the Primary Node (Master) ?


Thanks in advance.
Title: Re: Configuration of UART for RS485 Master or Slave
Post by: Jan Axelson on July 20, 2013, 06:32:15 pm
Here is one option that doesn't require 9-bit data:

http://www.hth.com/snap/



Title: Re: Configuration of UART for RS485 Master or Slave
Post by: Hardy on July 20, 2013, 08:08:06 pm
Thank you Jan!

I will check if this can be used for my case.