CAN bus: Difference between revisions

No edit summary
No edit summary
Line 20: Line 20:


===CAN IDs===
===CAN IDs===
Lower IDs have priority over higher IDs. While transmitting a message, each ECU must also listen. If it sees a 0 while sending a 1, it must cease to transmit until the current message ends. Logical 0 is the "dominant" signal:
Lower IDs have priority over higher IDs, and form the 11-bit "Arbitration Field" in a CAN frame (there are 2 such fields in an Extended Frame, one of 11 and one of 18 bits, separated by two bits). While transmitting a message, each ECU must also listen. If it sees a 0 while sending a 1, it must cease to transmit until the current message ends. Logical 0 is the "dominant" signal:


* If multiple ECUs are transmitting at the same cycle, all must transmit recessive, or everyone will see dominant
* If multiple ECUs are transmitting at the same cycle, all must transmit recessive, or everyone will see dominant
Line 26: Line 26:
* Synchronization begins on the first recessive to dominant transition after an idle period ("start bit" of frame)
* Synchronization begins on the first recessive to dominant transition after an idle period ("start bit" of frame)
* Resynchronization occurs on each subsequent recessive to dominant transition
* Resynchronization occurs on each subsequent recessive to dominant transition
==Frames==
A frame begins with a transition from recessive to dominant, the "start bit". It is followed by:
* 11-bit base identifier, common to CAN-2.0A and B.
** All transmitting ECUs must be listening during this field, and MUST cease transmitting if preempted by a dominant signal
* RTR bit. Remote Transmission Requests (recessive) expect a response.
** Much more common are Data Frames (dominant), which carry payloads and expect no response