Bitwise arbitration (HOW collisions are resolved without retransmit):
Bus is wired-AND: dominant (0) overrides recessive (1) (like I2C's wired-AND).
Every transmitter sends its ID and listens to the bus simultaneously.
If a node sends recessive(1) but reads dominant(0), it lost → backs off instantly, keeps listening.
The node with the numerically lowest ID (most leading dominant bits) wins and continues without any corruption. This is non-destructive arbitration — the winning message is never re-sent.
How does CAN resolve simultaneous transmissions without retransmission?
Bitwise non-destructive arbitration: a node sending recessive but reading dominant loses and drops out; lowest ID (highest priority) wins intact.
Why is CAN bus length limited at high bit rate?
A node must hear the bus round-trip within one bit time to detect arbitration loss: tbit≥2L/v.
Why is CAN noise-immune?
Differential signaling — common-mode noise hits both wires equally and cancels in VCANH−VCANL.
Recall Feynman: explain to a 12-year-old
Imagine chips passing notes.
UART: two friends, no shared clock — they agree "read one letter every second," one taps the desk to say "starting now."
SPI: one boss with a metronome; whoever the boss points at (SS) trades a note with the boss every tick — super fast but the boss needs a separate finger to point at each friend.
I2C: a class on a party line — everyone whispers their name first ("address"), only the matching kid answers, and the rule is "if anyone says quiet (LOW), it's quiet."
CAN: kids in a noisy room shouting numbers; the kid with the smallest number always wins and finishes their sentence, and because they all whisper through two cups, the room noise cancels out.
Dekho beta, sabse pehle core baat samajh lo — kisi bhi chip ke beech data bhejne ke liye wire pe sirf ek cheez travel karti hai: voltage jo high ya low hoti hai time ke saath. Bas itna hi. Toh ye saare protocols — UART, SPI, I2C, CAN — koi jaadu nahi hai, ye sirf ek "agreement" hai do chips ke beech ki: bit kab shuru hoti hai kab khatam (timing ya clock), kitne wire use karenge, aur kiski baari hai bolne ki (addressing). Jab tum ye samajh loge, toh poora subject easy lagega, kyunki har protocol bas in teen sawaalon ka alag jawab hai.
Ab har protocol apna trade-off leke aata hai. Jaise UART — ismein clock wire hi nahi hoti (asynchronous), dono side pehle se baud rate pe agree kar lete hain, phir ek "start bit" starting gun ki tarah kaam karti hai aur receiver stopwatch ki tarah har bit ke beech mein sample karta hai. Isiliye ye ~5% clock error tolerate kar leta hai — bahut simple, bas 2 wire. Wahin SPI super fast aur full-duplex hai kyunki do shift registers ek ring mein jude hote hain, har clock edge pe ek bit MOSI se bahar jaati hai aur ek MISO se andar aati hai — 8 clocks mein poora byte swap ho jaata hai, koi overhead nahi. I2C sirf 2 wire mein bahut saare devices handle karta hai (addressing se), aur CAN noise-immune hai isliye cars mein use hota hai.
Ye matter isliye karta hai kyunki real embedded systems mein tumhe choose karna padta hai — agar speed chahiye toh SPI, agar pins bachane hain toh I2C, agar simple point-to-point link chahiye toh UART, aur noisy automotive environment mein CAN. Interview aur real projects dono mein ye decision aata hai. Aur ek chhoti si important baat: jaise UART example mein dekha, start/stop bits bhi time lete hain, toh effective throughput hamesha baud rate se kam hoga — ye "overhead" wali soch tumhe practical calculations mein bachayegi.