RS485 to UART Convension

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

I need to send data from one PIC to another PIC by using RS485. As a protocol I use UART. However, I cannot be sure about RS485 transceiver and its circuit. I will be able to supply 5 V and according to this I have found one of the most used option is LT1785 chip. I have these following questions related to this chip:

     1) Can this chip (LT1785) also convert RS485 signal to UART or it can only convert UART to RS485?

     2) There is no hardware diagram in the datasheet so I have take a look at the internet and some people use 120 ohm resistor between rx and tx pins some people do not. Do I need to put that resistor?

     3) In some schematics some people shorted the RE (receiver output enable) and DE (driver output enable) pins. What is the purpose for it? Do I also need to short them?

     4) There is a circuit image for UART to RS485 convension. Do I need to change the circuit if I need to use LT1785 for RS485 to UART convension or can I use the circuit in image without changing it?

     5) Is there a need for a resistor or a capacitor between Vdd pin to Vdd and a Ground pin to Ground.

PS: I am new to these topics so please excuse if the questions are too simple. Thank you beforehand.

Attachment(s): 

Last Edited: Fri. Mar 22, 2019 - 01:47 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

1. The chip is described as a ‘transceiver’ so it is a transmitter and receiver.
2. Depends. That resistor is for terminating the 100 ohm transmission line.
3. Depends. Usually the rs485 is half duplex ie: you are only transmitting OR receiving at one time. Joining DE and RE ensures this. These are connected to a port pin so the microcontroller controls this.
4. This circuit omits a couple of important items. A 10k resistor from RO to VCC to ensure the receive signal does not float when the receiver is not enabled. a 10k resistor from RE/DE to GND to ensure the transmitter is not enabled when the microprocessor is in reset.
5. Resistor - no. Capacitor,most likely yes to provide bypassing.

You might want to read this:
http://www.ti.com/lit/an/snla049b/snla049b.pdf

As well, the ltc1785 is quite slow when enabling the transmitter. Your software needs to account for this.

Last Edited: Fri. Mar 22, 2019 - 02:05 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

485 is used in a lot of places, so to answer your questions, we will need more info.

Is your rs485 a single bus (i.e. half duplex) or twin bus configuration (i.e. full duplex) comms?

There are many 485 bus chips to choose from, which one you pick will depend on many factors required for your application, the LT1785 is but one.  Note: most have the same pinout so changing to a different one is not difficult.

DE/RE is tied together for half duplex operation.

Yes, you will need bypass cap on VCC/GND pin pair!

Bus termination (and biasing resistors) may be needed depending on where on the bus your device is located!

 

Sounds like you have a lot of reading ahead of you to learn more about RS485 before these questions can be asked or answered fully.

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, yes unfortunately I am inexperienced. This one will be my first design. ( well it is simple one but anyhow.)

I will send data from one PIC to another so my RS485 will be half duplex. Distance will be max 1 meter long. So I have decided to short DE/RE pins, that will be easier and save me 1 pin. Thank you both for the feedback. I will re-design the circuit according to your feedbacks. Can I ask from this post again if the last version of the circuit looks okay, on Monday? I just want to be sure.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

GunkutA wrote:
from one PIC to another PIC
Can't help thinking you may have come to the wrong place??

 

Perhaps try:

 

https://www.microchip.com/forums...

 

(it's true Microchip now own the Atmel AVR chip design but this site still concentrates mainly on AVR).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a two device 485 half duplex circuit, you will need termination resistors across the bus on both ends,

one end will need bus bias resistors to hold proper levels during times when neither transceiver is talking.

Note: you will also need a pull up resistor on your micro's RXD input line, don't ask me how I know that!

Good luck with your project!

 

Jim

PS: this is not a PIC website, but for general electronic questions (like rs485) you can post your questions in the general electronic forum.

 

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274
get $5 free gold/silver https://www.onegold.com/join/713...

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:

GunkutA wrote:
from one PIC to another PIC
Can't help thinking you may have come to the wrong place??

 

Perhaps try:

 

https://www.microchip.com/forums...

 

(it's true Microchip now own the Atmel AVR chip design but this site still concentrates mainly on AVR).

 

Yes it was just a background information tho, I believe its more like a circuit design question. :) nothing special to PIC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the answers! Indeed very good explanation, appreciate it.