RS232 to RS485


Closed Thread
Results 1 to 23 of 23

Thread: RS232 to RS485

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default RS232 to RS485

    Hi, I need to connect my PC to some of my circuits that use RS485. I was going to have a converter built into one of the circuits. It looks like it should be as simple as connecting a MAX232 chip to a MAX485 chip. That should be fine for 1way communications but if i want it 2 way then i need the serial port to be able to switch between RS485 driver and receiver. Would i be able to use those extra pins on the serial port for this? Which ones can i actually use? Im thinking about CTS, DSR etc. Im not sure which ones are inputs and which are outputs though. Do i need any other components between these pins and the MAX485's RE and DE pins? Maybe resistors?

  2. #2
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

  3. #3
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    The first document makes the choice of pin straight forward. Looks like its RTS then. I re-read the datasheet on the MAX485 chip and noticed something that i didnt notice before. "RO is enabled when RE is low". That helps quite a lot. I thought either RE or DE had to be high to enable either RO or DI. The diagram in the first doc was very helpfull. I thought i was going to need 2 pins from each PIC chip and 2 pins from the serial port for this but it turns out i only need 1.

    I didnt see anything about the voltage that comes out of RTS but i guess thats easy enough to measure myself with a multimeter and im guessing its about the right voltage anyway.

    Thanx for the help, i think ive got everything i need to know now

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Hi again, I finally got around to measuring the voltage that comes out of RTS. It is about 6V when on and -6V when off. That seems to work an LED fine but what about the MAX485 chip? Ive looked at the datasheet and it appears that "low" is classed as below 0.8V and "high" is 2V or more. Is 6V too much for the chip? It doesnt seem to give a max value for that. I would assume the max input voltage is about the same as VCC. Do i need a diode or anything to stop the negative voltage going into the DE and RE pins?

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    You have to clamp the RTS levels to TTL levels. Or else the chip might get fried.

    Why don't you use the 555 circuit idea? It is automatic, no drivers required. Is it necessary to transmit and receive exactly at the same time?

    Ioannis

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I have been thinking about that for a while. It looked really complicated at first but i think i get the general idea. The description near the bottom was a bit confusing but the diagram makes sense. Since first looking at RS485 i was going to have the PIC chips switch between sender and receiver. I need data to be sent pretty quick but i dont need quick replies from any of the devices so that would have worked pretty well.

    Im doing a little redesigning of the main driver circuit at the moment to add some extra features. The way im doing it might mean i have no choice but to use the 555 way. They are extra components but i suppose they are pretty cheap.

    Thanks for clearing that up anyway. Saved me from releasing the mysterious blue smoke again

Similar Threads

  1. UART vs software RS232
    By Michael in forum mel PIC BASIC Pro
    Replies: 27
    Last Post: - 5th September 2008, 18:27
  2. RS232 into 2 PC ports
    By manxman in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th August 2008, 13:33
  3. PIC18F4680 to PC via MAX232 (RS232 serial) no output
    By opticsteam1 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 14th April 2008, 20:39
  4. Using 16f676 with comms
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 28th October 2005, 20:01
  5. rs485 to rs232 smart switch
    By RSSHARPE in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th June 2004, 08:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts