0
\$\begingroup\$

  For example, an MCU (stm32, esp32, Pic18f .. etc) with CAN embedded, sends logic level signals through pins Tx and Rx.

They only need a signal converter. (example: MCP2551).

My question: Why can't any MCU with tx and rx pins use just one signal converter? Why does this also need an adapter? (Example MCP2515).

\$\endgroup\$
0
\$\begingroup\$

The CAN protocol requires a specific collision detection mechanism that is difficult to implement in software, because all stations that have outgoing data start sending at the same time and then one after the other drop out as they determine that a station with a higher priority is also sending.

Having a CAN controller inside the MCU means that this protocol is built as a dedicated circuit, so the controller can be connected to a CAN bus (through an external transceiver) with little effort, while an MCU without a CAN controller would require a complex interrupt routine that would take a significant amount of processing time and use a bit more power.

\$\endgroup\$
3
\$\begingroup\$

You can avoid a lot of confusion if you get your terminology right.

To access CAN bus the MCU needs two things: CAN Controller and CAN Transceiver. Controller has Tx and Rx pins. Transceiver converts these pins into CANL and CANH bus signals.

When you say "MCU with CAN embedded" what you really mean is that CAN Controller is already part of MCU, so you only need external Transceiver (e.g. MCP2551) to make it work.

When MCU does not have embedded controller it needs both external Controller (e.g. MCP2515) and a Transceiver.

Finally, when people say "adapter" they usually mean external device that has both Controller and Transceiver on one board.

Note that MCP2515 is not an "adapter", just like MCP2551 is not a "converter".

So, to your actual question:

Why can't any MCU with tx and rx pins use just one signal converter? Why does this also need an adapter?

the answer is: MCU with embedded CAN controller does NOT need an adapter.

However "any MCU with tx and rx pins" does not describe such an MCU, because having Tx and Rx pins is too ambiguous, it can refer to UART interface, for example.

\$\endgroup\$
0
0
\$\begingroup\$

There are CAN controllers which have built in CAN transceiver as well. Only an example: http://www.ti.com/product/TCAN4550

The driving factor for the dedicated controller to not have a transceiver built in is price, size of the IC. It is expected to use any already available cheaper transceiver and to be able to have wider options.


From Renesas note: Definitely not compliant to CAN protocol

enter image description here

\$\endgroup\$
0
\$\begingroup\$

You seem to be confusing two different things. Microcontrollers also have UARTs that have TX and RX pins. That only talks messages over the asynchronous start stop protocol and is not compatible with CAN protocol, even if they both have pins named TX and RX.

If a microcontroller has a CAN peripheral with TX and RX pins, it means it has the necessary hardware to send CAN frames, or message bits and bytes with appropriate headers at some defined baud rate, but as the microcontroller IO pins use for example 3.3V CMOS logic levels, it needs a physical interface (PHY) chip, also known as a tranceiver, to convert the 3.3V CMOS levels to the necessary 12V CAN bus levels.

If microcontroller does not have a CAN peripheral, then it can't directly send CAN frames, and in such a case usually a separate CAN controller chip (e.g the MCP2515) would be connected to the microcontroller via some other bus like SPI. The CAN controller may or may not contain the physical interface, and thus it may also need an external PHY chip. The MCP2515 is also only a CAN interface and it still needs a CAN PHY chip like the MCP2551.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.