How can I read an RS485 stream?


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120

    Question How can I read an RS485 stream?

    Hello guys,

    I hope you are all well.

    A simple question.How can I read an RS485 stream from a device(MASTER) using 16f628(SLAVE).Do I need to convert the stream to rs232 protocol?
    I have MAX1482 low power transeiver for rs485 communication.
    Please send any usefull info,schematic.

    Best Regards
    Nikos Geronikolos

  2. #2
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    352


    Did you find this post helpful? Yes | No

    Smile

    Hello ngeronikolos,

    Rs485 is simply the transmission means to send serial data from one device to many. You use a RS485 transceiver connected to the same pins on the PIC that you would connect a RS232 interface and then you can send and receive your data as you would regular RS232. You will need to create the software that will talk to the individual slaves. Search this forum as there have been articles written about RS485. You can also get Jan Axelson's great book on the SERIAL PORT. It has alot of examples of RS485 communications.

    BobK

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    One tip: You have to place the chip in either transmit or receive mode. If your planning on doing some type of bidirectional communication you will need to use one pin on your PIC for this task AND write your commands to toggle it when needed.

  4. #4
    Join Date
    Feb 2005
    Location
    GREECE
    Posts
    120


    Did you find this post helpful? Yes | No

    Default

    Thanks guys,
    I understand.I have to use the same commands as in RS232 interface?
    If it is that correct,I have to replace the max232 with the MAX1482. My chip I want to be in receive mode!!

    Before I connect the master device with my pic,how can I read the data using my COM1 of my PC?

    Thanks
    Nikos Geronikolos

  5. #5
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    To receive via your PC you would need to connect the RS-485 transceiver to a RS-232 converter. You would then either pull RX TX enable lines high or low. Alternatively, you could tie the enable line to RS on the serial port...your call.

Similar Threads

  1. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  2. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  3. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  4. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34
  5. Conflict receiving RS485 stream
    By ngeronikolos in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th August 2005, 15:27

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