Shop OBEX P1 Docs P2 Docs Learn Events
mBus Controller Area Network — Parallax Forums

mBus Controller Area Network

LoopyBytelooseLoopyByteloose Posts: 12,537
edited 2005-09-30 03:18 in General Discussion
I happened to take a look at what is on sale with Parallax and came across the CAN bus interface.

Since I have become interested in RS-485, I have thought there might be an easier way than writing all the network code [noparse][[/noparse]error checking, packets, and collision avoidance].· This seems to be appropriate, but I can not find any discussion on the Forum.

Has anyone used it with the SX?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
G. Herzog in Taiwan

Comments

  • edited 2005-09-28 02:27
    George:

    You are correct ... CAN is basically RS-485 with a lot of great, additional features implemented in hardware.

    There have been a few forum discussions on CAN over the past year. Unfortunately, I haven't had much luck finding them with the forum's search tool.

    I do not have experience using the CAN interface with the SX, but don't expect any problems. It works via standard serial communications. The PBasic code on the product page (http://www.parallax.com/dl/src/prod/CANexSrc.zip) should work fine.

    Let me know if I can help in any way.

    Dan Mannisto
    Machine Bus

    P.S. The product should be off backorder very soon.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2005-09-28 15:24
    The interface is TTL asychronous serial with hardware handshakes. Right?

    That should not be any problem for the SX.

    I really, really like the fact that the CAN is set up to work in automotive as this is just about as hostile and electronically noisy as an enviroment gets. The whole package looks good.

    I do understand that all that environmental protection comes as some reduction in speed [noparse][[/noparse]especially over long wires, like 1000 feet] and 8-byte packets of data.

    But, the trade-offs seem to be very well thought out. Also, it has been around since the 1980s and has a proven track record.

    What's not to like?

    I still need to re-read the actual hardware document in detail before I put more questions to you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    G. Herzog in Taiwan

    Post Edited (Kramer) : 9/29/2005 9:25:45 AM GMT
  • edited 2005-09-30 03:18
    Yes. That's correct. TTL I/O with RTS/CTS.

    It's true about the speed reduction, but as I'm sure you know additional protocol always comes at a cost. I think it's worth it for embedded applications.

    You could look at the 8-byte maximum data length as a negative or a positive. CAN was designed for real-time control. Limiting the packet length adds predictability. No single device can monopolize the bus for longer than one data frame. The downside is that you have to break apart larger chunks of data. Remember that can was designed for distributed control where small amounts of binary data are exchanged. If your application requires streaming audio or video, there are better alternatives smilewinkgrin.gif

    Dan
Sign In or Register to comment.