Controller Area Network (CAN) bit stuffing

In summary, bit stuffing is a technique used to ensure synchronization of all bus nodes. It is used when transmitting a message, and a maximum of five consecutive bits may have the same polarity. Then a bit is stuffed.
  • #1
gomathi.c
2
0
I was going through an article on CAN bus in Wikipedia & was stuck at the point where bit stuffing is explained. CAN is an asynchronous bus. They implement NRZ (Non-Return-To-Zero) encoding. To enable the receiver to correctly read the messages, continuous resynchronization is required.

Generally, in NRZ, a problem arises when there is a long sequence of 0s or 1s and the voltage level is maintained at the same value for a long time. This creates a problem on the receiving end because now, the clock synchronization is lost due to lack of any transitions and hence, it is difficult to determine the exact number of 0s or 1s in this sequence.

As per, http://www.softing.com/home/en/indu...re-can-bus/bit-encoding/bit-stuffing-rule.php
One characteristic of Non-Return-to-Zero code is that the signal provides no edges that can be used for resynchronization if transmitting a large number of consecutive bits with the same polarity. Therefore bit-stuffing is used to ensure synchronization of all bus nodes.
This means that during the transmission of a message, a maximum of five consecutive bits may have the same polarity. Then a bit is stuffed.

What I don’t understand is, why in NRZ, a consecutive 0’s & 1’s don’t provide edge? I assume edge means a transition. Am I right? Kindly explain me. Thanks in advance.
 
Last edited:
Engineering news on Phys.org
  • #3
In the following website, it is given that there won't be any transitions if there is large number of consecutive 0's or 1's. The bit boundaries can't be distinguished. So, the receiver clocks can't synchronise. But, what actually happens in receiver with each bit transition? And what happens if there is no transition? What happens when the bit boundaries can't be distinguished?

http://www.erg.abdn.ac.uk/~gorry/eg3567/phy-pages/nrz.html
 
Last edited by a moderator:

1. What is bit stuffing in Controller Area Network (CAN)?

Bit stuffing is a technique used in the CAN protocol to ensure synchronization between the sender and receiver. It involves adding an extra bit of the opposite polarity after five consecutive bits of the same polarity. This helps avoid long sequences of identical bits, which can cause errors in communication.

2. Why is bit stuffing necessary in CAN?

Bit stuffing is necessary to maintain synchronization between the sender and receiver in the CAN protocol. Without bit stuffing, long sequences of identical bits can cause the receiver to lose track of the bit boundaries, leading to communication errors.

3. How does bit stuffing affect the data transfer rate in CAN?

Bit stuffing slightly reduces the data transfer rate in CAN because it adds an extra bit for every five consecutive bits of the same polarity. However, the impact on the data transfer rate is minimal and does not significantly affect the overall performance of the system.

4. Can bit stuffing cause errors in CAN communication?

While bit stuffing is designed to prevent errors in CAN communication, it can still cause errors if not implemented correctly. For example, if the sender and receiver have different bit stuffing algorithms, it can result in synchronization issues and communication errors. Therefore, it is important to follow the standardized bit stuffing protocol to ensure error-free communication.

5. Is bit stuffing used in other communication protocols?

Yes, bit stuffing is used in other communication protocols besides CAN, such as Ethernet and USB. It is a common technique used to maintain synchronization and avoid long sequences of identical bits that can cause errors in communication.

Similar threads

  • Electrical Engineering
Replies
15
Views
2K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
  • Programming and Computer Science
Replies
15
Views
1K
  • Quantum Physics
Replies
2
Views
1K
  • Computing and Technology
Replies
3
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
Replies
12
Views
2K
Replies
4
Views
5K
Replies
7
Views
3K
  • Classical Physics
Replies
9
Views
6K
Back
Top