|
 Cedar Rapids, Iowa | Ok, get your geeky glasses on, we're going deep. For my example, we'll assume this is a 5 volt CAN circuit, but CAN can use other voltages.
CAN uses two wires, high and low. Normally the voltage across the wires is 0 volts. We all know that computers send data in the form on 0s and 1s. When a node on a CAN network is transmitting a 0 bit, the CAN high wire gets driven to +2.5 volts, and the CAN low wire gets driven to -2.5 volts. The difference across them is then 5 volts. When a node wants to transmit a 1 bit, it just quits driving the high and low wires, and resistance on the circuit quickly bleeds off the voltage, taking the wires back to 0 volts.
The people that created the CAN standard decided that 60 ohms was the appropriate amount of resistance. This is enough resistance that it will quickly pull the voltage to 0, but not so much that it's hard to drive them to 5 volts.
It was then discovered that instead of a single 60 ohm resistor, it's better to use two 120 ohm resistors in parallel. Now, put one on each end of the bus. High speed electrical signals, in some scenarios, have a tendency to reflect or echo off the ends of a wire. By using two resistors, one at each end, it helps reduce this reflection. On a bus that is short, you can actually put both CAN terminators right next to each other. If you're working with CAN in a test environment, you can use a single 60 ohm resistor anywhere on the circuit.
The really really cool feature this creates is that two devices can start transmitting at the exact same time. The message ID is one of the first pieces of data transmitted, and the message with the lower ID always gets priority. How this works is that both nodes will begin transmitting a message, and any time there is a 1 bit, the bus should go back to 0 volts. Remember that when a device is 'sending' a 1 bit, it really isn't sending anything, the lines are being pulled back to 0 volts by the resistors, unless some other device is transmitting a 0 bit and thus holding the lines at 5 volts. So any time a device transmits a 1, it watches the line voltage to see if it remains at 5 volts, and if so, it aborts sending any more data. The device with a message of a lower number has priority and keeps transmitting.
So, if you only have one of the two terminators installed, what you have is 120 ohms of resistance, not the 60 that you should have on the circuit. This means that the lines won't return to 0 volts as quickly as they should. Devices will sometimes see this and think another device is transmitting a message with a higher priority, and thus they'll quit transmitting their message.
-Lance
(CAN.jpg)
Attachments ----------------
CAN.jpg (30KB - 506 downloads)
| |
|