26 votes
Accepted

Why do microcontrollers always need external CAN tranceiver?

While I don't know the particulars of designing and fabricating these respective circuits, my expectation is this: CAN interfaces must handle relatively high currents (>100mA), which requires ...
Tim Williams's user avatar
  • 34.3k
24 votes

What is the limiting factor for a CAN bus to exceed 1Mbps bandwidth?

From Controller Area Network Physical Layer Requirements CAN is an open collector technology – the protocol could not work otherwise. This means that the recessive state of a CAN transceiver is not ...
StainlessSteelRat's user avatar
22 votes
Accepted

Significant differences between CAN and RS485 regarding the physical layer

When comparing the physical layer only, CAN and RS-485 are similar in that they both use differential signaling. This gives them both good common mode noise immunity. The main difference is that RS-...
Olin Lathrop's user avatar
19 votes
Accepted

Microchip documentation does not label CAN buss pins on micro controller pinout diagram

The CAN pins do not have fixed pin assignments. Instead you are able to select which of the "Remappable Pins" you wish to use (RP0 through RP15). If you refer to page 180 of the datasheet, ...
Tom Carpenter's user avatar
18 votes
Accepted

Enable interrupt but no ISR

If there is no ISR defined, the location for the jump instruction in the interrupt vector will either be null, it may be a jump to an exception routine, it may jump to the beginning of the program, or ...
tcrosley's user avatar
  • 48.1k
17 votes
Accepted

CAN bus signal integrity

No. The differential signalling is performing as intended. No. As long as the "common mode voltage" does not exceed the ratings of the transceiver. And the maximum DC ratings, which for a CAN ...
Jeroen3's user avatar
  • 23k
16 votes
Accepted

CAN Bus Licensing

It's included in the cost of the parts. It's a lot easier to collect money from a few IC makers than from every person who makes a product using those parts.
Andrew's user avatar
  • 6,902
16 votes
Accepted

How to deal with signed int overflows

Clearing up some misunderstandings will probably help. First, your data is a 16-bit value. There's no "overflows" and "actual data" -- the 16 bits are just divided into two 8-bit pieces (bytes). To ...
Adam Haun's user avatar
  • 22k
15 votes
Accepted

Which STM32 is best for logging a CAN network?

The shortest CAN frame is 55 bit times, so in the very worst case situation with a completely saturated bus consisting of one data byte frames (which is not really realistic for a CAN bus with any ...
Jon's user avatar
  • 5,057
14 votes
Accepted

Why do more transitions imply more bandwidth consumed?

That's because for an NRZ signal the fastest signal you can have on wire is an alternating ...101010... pattern which are the bits themselves. For a 1 Mbps data rate the maximum frequency of the ...
Justme's user avatar
  • 149k
13 votes
Accepted

Twisted pair impedance

Do some time domain reflectometry, a useful video to this process is probably one from w2aew. He shows it with a coax, but it should work with anything that has a somewhat consistent impedance. In ...
PlasmaHH's user avatar
  • 6,538
13 votes

CAN Bus Licensing

If you are using a third-party CAN controller chip, then they will have paid the licensing fee. The original patents related to the way the controller worked, so the vendor requires a license in order ...
Jon's user avatar
  • 5,057
12 votes
Accepted

Using CAN bus tranceivers with custom data link layer

Many small and cheap microcontroller have CAN built in. Look at some of the PIC 18 with "8" in their part number. You only need to add the physical CAN transceiver, like a MCP2551. If you just want ...
Olin Lathrop's user avatar
12 votes
Accepted

CAN bus layout design

You are getting confused about the impedance. The type of CAN you are apparently using is implemented as twisted pair with roughly 120 Ω impedance. That is why there is a 120 Ω resistor ...
Olin Lathrop's user avatar
12 votes

Does it matter which 2 nodes on a CAN bus you terminate?

Each beginning has its end. This can't be answered, because the question is not correct. What you have is the transmission line - a twisted pair that has two ends, and that's the place where the ...
Marko Buršič's user avatar
12 votes
Accepted

CAN bus - Priority/collision

Funny that with so many correct answers, I still feel like something is amiss or not clear enough. Even most complete answer by @Nick does not correct some wrong assumptions in the question. So, I'll ...
Maple's user avatar
  • 12.6k
12 votes

Why do microcontrollers always need external CAN tranceiver?

It would be terribly expensive to build a CAN PHY which can directly handle the electrical requirements of a CAN bus directly into a general purpose MCU. Same goes on for any other electrical ...
Justme's user avatar
  • 149k
11 votes
Accepted

CAN bus test via loopback - possible or not?

All CAN hardware error checks are performed by hardware - the CAN controllers. A CAN node cannot ack itself, by design. It will not receive its own messages. CAN is meant to have at least two nodes ...
Lundin's user avatar
  • 20.2k
11 votes

Does it matter which 2 nodes on a CAN bus you terminate?

It doesn't matter which nodes are at the ends, but it does matter that the terminators are at each end. The bus is a transmission line. To keep edges from reflecting at the ends of the cable, the ...
Olin Lathrop's user avatar
11 votes

What is the color code for CAN Bus?

CAN does not have a formalized physical-layer specification for conductor colors, or things like connector type or pin-out. There are common practices (like using a 9-pin D-sub connector) but no ...
Chris M.'s user avatar
  • 1,330
11 votes
Accepted

The CAN bus in this vehicle has only one 120 ohm termination resistance. What problems would this provoke?

From a professional point of view, this is a critical problem. Missing termination will cause energy bouncing back at the end which isn't terminated. This could lead to strange random noise on the ...
Lundin's user avatar
  • 20.2k
11 votes

Why do microcontrollers always need external CAN tranceiver?

The CAN transceiver needs some adaptability that the microprocessor may not be able to support. Depending on which CAN transceiver chip you choose, you can get additional control over: Slope Control,...
Smith's user avatar
  • 1,158
10 votes
Accepted

Why common-mode choke on differential-signal serial lines?

Wouldn't the common-mode noise simply be cancelled in the receiver? A lot of noise would be heavily cancelled in a differential receiver but, high frequency stuff can cause problems and, of course a ...
Andy aka's user avatar
  • 458k
9 votes

CAN bus - Priority/collision

First let's clarify something. CAN bus addressing works on message IDs. CAN bus itself doesn't have node IDs. (One could create a scheme for where some kind of node ID is a part of the message ID, ...
Nick Alexeev's user avatar
  • 38.2k
9 votes

How is a CAN bus like an AND gate?

When you map the CAN bus state into a truth table, you get following: This is the same logic you'd get for a n-channel AND gate. As the term suggests, a dominant bit will always overrule a recessive ...
Velvet's user avatar
  • 4,309
8 votes
Accepted

Will this selectable CAN BUS termination circuit work?

It looks like it should work if you're not pushing the CAN bus to the limit. You can definitely turn on the LED with 3.3 V since the maximum LED voltage is 1.5 V. It needs about 5 mA, so you can ...
Olin Lathrop's user avatar
8 votes
Accepted

How and why is impedence matching done for a CAN bus?

The "terminators" of a CAN bus serve two purposes: They terminate the transmission line. The type of CAN you are referring to is intended to be implemented as a twisted pair. 120 Ω is roughly ...
Olin Lathrop's user avatar
8 votes

What is the limiting factor for a CAN bus to exceed 1Mbps bandwidth?

It can. Meet CAN-FD. Why was a new protocol needed? CAN is a multi-master bus with arbitration and error reporting. These features limit the data rate based on the cable length, since it takes a ...
Adam Haun's user avatar
  • 22k
8 votes
Accepted

Ethernet vs CAN bus physical signal

On a hardware level: The CAN bus works by a voltage differential between a pair of lines. The Ethernet bus is current-driven and is coupled through transformers at both ends, providing galvanic ...
Damien's user avatar
  • 8,016
8 votes
Accepted

Why are capacitors and resistors commonly used with CAN High & CAN Low lines?

ISO 15765-4 "Road vehicles — Diagnostics on Controller Area Networks (CAN) — Part 4: Requirements for emissions-related systems" section 8.4 relates to "External test equipment", a ...
Bryan's user avatar
  • 2,196

Only top scored, non community-wiki answers of a minimum length are eligible