Thread: Com wire
View Single Post
  #22   Spotlight this post!  
Unread 12-01-2016, 11:55
s1900ahon s1900ahon is offline
Registered User
AKA: Scott McMahon
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 155
s1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant futures1900ahon has a brilliant future
Re: Com wire

Quote:
Originally Posted by RyanN View Post
So what makes CAN really cool is no one is a master controller and no one is a slave device. Any device can talk to any device. It's a broadcast network with wither 11-bit IDs or 29-bit extended IDs.
The IDs (MessageID) isn't just used to identify a device. The MessageID is part of the arbitration mechanism on CAN and so as multiple devices start to send their message, the lowest valued MessageID wins (simplified). As the bits are transmitted, if the value on the bus doesn't correspond to the value being transmitted, the node backs off (lost arbitration, but keeps listening so it can later ACK/NACK the packet for CRC). Since the MessageID is sent most-significant bit first, and 0s are dominant, the node sending a 0 beats a node sending a 1 (hence the lower value wins).

When developing Jaguar, I spent time fracturing up the extended MessageID to ensure things like "everyone stop!" got through, to everyone. In effect the Jaguar CAN protocol uses the MessageID field divided such that functions arbitrate before src/dst, where the important safety functions are low valued and broadcast (i.e. Vendor=All=0, MessageID=0 is like FunctionGroup=Safety=0, Function=Halt=0, Dest=Everybody=0--it has been almost 8 yrs since this was worked out so this is from memory).

Quote:
In practice, CAN is usually limited to speeds up to 500 kbps, but will reach speeds up to 1 Mbps.
FRC CAN is 1 Mb/s.