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


    Did you find this post helpful? Yes | No

    Default

    I am using a termination resistor at the end with the 555 aswell as 2 biasing resistors exactly as shown in the diagram in your first post. I have the RS232 to RS485 converter plus 2 lights on breadboards at the moment. The MAX485 chips are less than 5cm apart but i can add another terminating resistor at the end just to be sure.

    Ive been thinking about this one and i think i got it the wrong way round. The thing that got me thinking is that the offset is constant even if i stop sending data then start again. You would expect it to keep shifting one or 2 bytes further out everytime the 555 gets chance to turn back off. I looked at how the circuits reacted to the data and it seems they are actually getting an extra byte or 2. I think that may be to do with the way ive programmed it but now im looking in the right place i have a better chance of solving the problem.

    I do like the idea of using a 555 because it allows me to have a status light that doesnt flash too quick to see and doesnt need any other components

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


    Did you find this post helpful? Yes | No

    Default

    It turns out it was a programming problem. As the chips start up the first one sends out a byte to tell the others how many chanels it has then goes into receive mode. The second one then does the same thing but the byte it sends out gets counted as data by the first light. Im really not sure why it was sometimes 2 extra bytes but ive reprogrammed it and it seems to be working perfect now. Sorry for wasting your time

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


    Did you find this post helpful? Yes | No

    Default

    You're now an expert who can help the next RS485 noob.

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


    Did you find this post helpful? Yes | No

    Default

    Haha, I wouldnt say 'expert'. Remember im the one who just got it wrong. I havnt tested with long wires yet so no doubt ill have more problems

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    Haha, I wouldnt say 'expert'. Remember im the one who just got it wrong. I havnt tested with long wires yet so no doubt ill have more problems
    If you're using drivers designed for '485 and you design the circuit within the '485 specs, why would you have problems with long wires? Shouldn't... Could happen...but shouldn't...

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


    Did you find this post helpful? Yes | No

    Default

    It "could happen" so it probably will the first time i try it. Im almost out of CAT5 cable so i guess it wouldnt hurt to buy another box and test it over the full length (about 300m). Ive just been reading a page about some of the things that can go wrong but i think ive got most of them covered. There might be a problem if the main box isnt connected because none of the lights bias the line themselves. I think thats a good thing because aparently too many devices biasing the line can stop data from being transmitted. Once the main box is connected they all need turning off and back on again before they can work anyway.

    Another idea is to put the biasing resistors in the terminating plug. Its possible because once the lights are turned on there will be both positive and negative voltages coming out of the socket. I doubt ill need to do that though

    I would like to connect up way more MAX485's than the specification allows and see how many it takes to stop it working just to make sure everything will be fine. I think the limit was about 30 unless i have those other ones that allow 128. I might need a bigger breadboard for that :P

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