Gerhard Fiedler email (remove spam text)
Chen Xiao Fan wrote:
> RS-485 is the old way to do this. CAN is usually better for new designs.
> It is differential with good noise immunity like RS-485, but the lowest
> level protocol is not only specified but implemented in hardware.
When talking about layers (at least OSI protocol layers)... CAN does not
specify the lowest level of the protocol (the hardware level). I guess
that's done on purpose, so that the CAN protocol can be used in different
situations and still be CAN. For example, you can use the standard ISO
11898-2 drivers and go up to 1 Mb/s on a differential pair without
isolation. Or you could use a pull-up resistor and transistors as drivers.
Or you could use optos as drivers and get a pretty slow but isolated
connection. Or you can make a driver that, on two wires, sends not only the
signal but also powers the other devices connected to the wires. And -- you
of course can make an RS-485 driver for your CAN bus. (I don't know why you
would do that, but you can.)
The only thing you have to do is to make sure different drivers can send
dominant and recessive bits at the same time without that in itself
creating a problem (which generally prohibits normal push-pull drivers),
and that a dominant bit is received by all receivers when two drivers at
the same time send a recessive and a dominant bit respectively.
>> I think CAN is as well not a very high level protocol. On top of it
>> people can use different application layer (?) like CANOpen or other
>> proprietary protocols.
In the OSI layer model, CAN is on layer 2 (data link). Layer 2 is generally
described as "Frame format, Transmitting frames over the net [additional
bit/byte stuffing, start/stop flags, checksum, and CRC]." In a traditional
RS-485 network, you see that this includes some of the standard async data
communication protocol (the part usually handled by the UART) and some of
what you have to add in firmware to make the transmission safer (like bus
arbitration and transmission error detection). It's that second part that
is so valuable in using the CAN bus protocol and hardware modules that
As for the higher layers -- there are many standards that use the CAN as
layer 2 protocol. Some of them include also a definition of layer 1 (the
physical connection), some don't.
Here are a few of the more common standards for the layer 1 protocol (the
physical link) used with CAN bus:
Here are listed a few of the higher layer protocols based on CAN bus:
There are also one or two open source (free) higher level protocol
implementations somewhere. (In C, IIRC... :)
Needless to say, the higher the level goes, the more assumptions it makes
about the function of the nodes and the application requirements.
In reply to: <3B8AEFFADD3DD4118F8100508BACEC2C0A2890AF@spex>
See also: www.piclist.com/techref/io/serials.htm?key=rs485
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the