collink
Joined: 08 Jan 2010 Posts: 137 Location: Michigan
|
Re: CAN bus load |
Posted: Sun Mar 21, 2010 11:22 am |
|
|
123music wrote: | what is 100% bus load in CAN bus?(assuming the baud rate is 500kbps)
pl clarify... |
I'm not exactly sure what you are asking so I'll try to cover multiple possibilities.
A canbus (standard) frame can be broken down like this:
1 start bit to start a new frame
18 bits for the header
0 - 8 bytes of data
15 bit CRC
1 bit CRC delimiter
1 bit ACK slot
1 bit ACK delimiter
7 bit end of frame delimiter
3 bits must separate data frames. This is the interframe spacing
So a 100% utilized bus would proceed like this:
1 start bit to start a new frame
<the guts of the frame>
7 bits to end the frame
3 bit wait time
Then immediately (the next bit time) there would be a start bit.
This is all great in theory but it essentially will not happen in real life. So 100% utilization is a fairy tale.
Now, if you are asking about theoretical transfer:
A baud rate of 500k means that 500,000 bits can be transferred per second. Since we're assuming 100% utilization we'll stick with that number. Further, I'm going to assume that 8 data bytes are going to be transferred each frame. So, using the breakdown above, with 64 data bits the total packet length will be at least 111 bits (slight aside here... I say at least because runs of more than 5 1's or 0's are broken up via bit stuffing. I'm ignoring that because it's unpredictable). 111 bits means that about 4500 frames can be sent a second. Additionally out of 111 bits only 64 of them were actual data so the bus overhead was 47 bits. This is 58% efficiency in data transfer. 42% was used as overhead. Thus, about 288,000 bits can be transferred (as data) per second at 100% utilization at 500k baud. |
|