Shop OBEX P1 Docs P2 Docs Learn Events
RS485 network — Parallax Forums

RS485 network

jnoguesjnogues Posts: 25
edited 2010-03-18 12:40 in Propeller 1
Hi All!
I want to do a RS485 network with for interconnecting diferents propellers.
My questions are:

What is the maxim bauds in serial comunication in a spin program?
Somebody knows if MAX487 is a good RS485 transceiver o there is another better?

Regards,

Jaume Nogues
Barcelona Spain

Post Edited (jnogues) : 1/16/2010 7:44:27 PM GMT

Comments

  • jnoguesjnogues Posts: 25
    edited 2010-01-16 19:36
    Sorry The subject is RS485 network
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-16 19:37
    Hi,

    Spin-only comm: 19.2kbps max

    Spin main program, with "FullDuplexSerial" running in separate cog: at least 112kbps, maybe 230kbps; higher speed quite possible with custom code.

    Sorry, I don't know - I have not used the MAX487.

    Best Regards,

    Bill
    jnogues said...
    Hi All!
    I want to do a RS485 network with for interconnecting diferents propellers.
    My questions are:

    What is the maxim bauds in serial comunication in a spin program?
    Somebody knows if MAX487 is a good RS485 transceiver o there is another better?

    Regards,

    Jaume Nogues
    Barcelona Spain
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • Bill HenningBill Henning Posts: 6,445
    edited 2010-01-16 19:38
    If you click on the "pencil" icon on the first post, you can edit the subject line
    jnogues said...
    Sorry The subject is RS485 network
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.mikronauts.com Please use mikronauts _at_ gmail _dot_ com to contact me off-forum, my PM is almost totally full
    Morpheusdual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory IO board kit $89.95, both kits $189.95
    Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
    Las - Large model assembler for the Propeller Largos - a feature full nano operating system for the Propeller
  • StefanL38StefanL38 Posts: 2,292
    edited 2010-01-16 20:11
    There are ready to use PASM-drivers like FullDuplexSerial, FullDuplexSerialPlus
    with an easy to program SPIN-interface that you can use.

    These serial drivers can go up to 115200 baud or even more.

    best regards

    Stefan
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-01-17 00:08
    As others have said, you should probably use FullDuplexSerial software.

    For the RS-485 physical interface, I have use the MAX487 and it works. What protocols and interface are you trying to do? Are you implementing some standard protocol set? Depending on where you install your equipment, you may want to consider a different IC or additional circuitry to protect or isolate the RS-485 lines.

    Is your project full duplex or will it be half-duplex?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • JonnyMacJonnyMac Posts: 9,208
    edited 2010-01-17 00:24
    Tim's post reminded me of something... on an RS-485 network you can only have one transmitter on at a time, and the RS-485 transmitter takes a few microseconds to start up; this means that you'll have to modify FDS a bit to enable the devices transmit output for a few microseconds (check the spec sheet for the exact value) before attempting to send a byte.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon McPhalen
    Hollywood, CA
  • T ChapT Chap Posts: 4,223
    edited 2010-01-17 00:50
    I use the MAX3430 RS485 IC, it will power off 3v3. It does take a some short amount of time to turn on the enable as already mentioned, but I just use a manual ON for the enable pin prior to each TX, then a waitcnt, then the TX.
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-01-17 00:52
    In a latest revision of a product I am using the Texas Instruments SN65HVD12D which also works off of 3.3V.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • jnoguesjnogues Posts: 25
    edited 2010-01-17 07:42
    Hi,

    Now I'm in the first steps because I'm new in propeller. I don`t have any protocol
    decided, but I need it for a simple home bus where the actions will be turn on/off.

    Best regards,

    Jaume Nogues
    Barcelona
    Spain
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-01-17 08:30
    Jaume -

    Starting out is great, all of us had to start out so we know what it is like. Lets think through your home bus protocol. First, I am sure there are various protocols out there because so many people have done varying degrees of home automation. At the core of what you said is that a device is on or off. So it is digital, what about in between? What about analog such as a light dimmer in a room?

    Your protocol could have a packet like the following:
    One byte of a device address - each device has a unique address. Maybe one address is a broadcast to all devices.
    One byte of an on/off/level status. 0 = 0ff, 1 - 254 = intensity level, 255 = Full on.
    one byte checksum - some validation that your packet is intack and has correct data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • jnoguesjnogues Posts: 25
    edited 2010-01-17 09:14
    Hi Tim
    Why you change from MAX487 to SN65HVD12D?

    Regards,

    Jaume
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-01-17 09:41
    I wanted a 3.3V device for connecting directly to the Propeller. I was using a design where there was only a 3.3V supply and no 5V supply. I believe the MAX487 was a 5V device. There are lots of other RS-485 transceiver ICs out there as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" LCD Composite video display, eProto for SunSPOT
    www.tdswieter.com
  • jnoguesjnogues Posts: 25
    edited 2010-03-18 09:51
    Hi Shirley, I think the MAX3430CPA is the best solution for my aplication, because is 3.3 V powered.
    In this moment I have finished the protocol for the bus in a Master-salave organitation, and want to start RS485 probes.
    I want use POE (power over ethernet) for suply the slaves via UTP wire.

    Regards,

    Jaume Nogues
    Barcelona
    Spain
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-18 12:40
    James, that was spam (joined today, one post, selling). They would be interested too if you could buy 5000 or more.

    There are plenty of chips to choose from but I wouldn't worry too much about which one specifically at the moment as they are practically all interchangeable. Tim mentioned a suitable one and I have used quite a few different ones too but it might depend more upon what you are able to get hold of too.

    For the protocol I wouldn't even consider FDX or the like, it's just not made for it although you could press it into service. But that depends upon what speed you are using and how you are using it anyway. Simple is good, with a few modifications it can be better. There are a few serial objects I have suitable for 485 plus my newer UNICOM object when I release it, but that might not be for a few weeks with my current workload.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
Sign In or Register to comment.