Author Topic: Configuration of UART for RS485 Master or Slave  (Read 20312 times)

Hardy

  • Member
  • ***
  • Posts: 2
Configuration of UART for RS485 Master or Slave
« 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.
« Last Edit: July 20, 2013, 01:22:58 pm by Hardy »

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Configuration of UART for RS485 Master or Slave
« Reply #1 on: July 20, 2013, 06:32:15 pm »
Here is one option that doesn't require 9-bit data:

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




Hardy

  • Member
  • ***
  • Posts: 2
Re: Configuration of UART for RS485 Master or Slave
« Reply #2 on: July 20, 2013, 08:08:06 pm »
Thank you Jan!

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