5.6.5 Controller Area Network (CAN)

Some of the PIC18F and PIC32CM MCUs offer integrated CAN controllers, enabling connection to CAN networks for automotive and industrial applications. These CAN peripherals support standard CAN 2.0 A/B protocols, provide message filtering, and include error handling and interrupt capabilities. They are designed to offload CAN protocol management from the CPU, improving real-time communication performance. Both variants require an external CAN transceiver for physical layer connectivity. Table 5-25 provides a comparison of features between PIC18F and PIC32CM.

Table 5-25. PIC18F and PIC32CM CAN Features
FeaturePIC18F CANPIC32CM CAN
CAN PeripheralsCAN, ECAN (Enhanced CAN)CAN
Protocol SupportCAN 2.0A/B

CAN-FD (ISO 11898-1:2015)

CAN 2.0A/B

CAN-FD (ISO 11898-1:2015)

Max Data Rate 1 Mbps (CAN 2.0)

Up to 8 Mbps (CAN-FD)

1 Mbps (CAN 2.0)

10 Mbps (CAN-FD)

Message Objects/Buffers Up to 32 buffers/FIFO Up to 64 RX and 32 TX dedicated buffers Two RX FIFOs
Data Buffer SizeUp to 64 bytes per CAN-FD frameUp to 64 bytes per CAN-FD frame
Acceptance FilteringUp to 16 full filters and three to four masks (ECAN, CAN FD)Up to 128 configurable filter elements J1939 filter
Time StampingLinks to internal Timer1/3/5 through CCP modulesCiA® 603 hardware timestamping External Timestamping Unit (TSU)
Loopback/Test Mode Supported for self-test operationsProgrammable loopback test mode
Error Handling Advanced error management

CAN error logging

Advanced error signaling

AUTOSAR/J1939 Optimization SupportedSupported
Number of CAN Channels Up to oneUp to two
Power-Down/Debug Support

Low-power Sleep mode

Bus activity wake-up with filter

Power-down Debug on CAN support
Host Memory AccessBuffers mapped into SFR memory spaceUses system RAM through AHB (flexible allocation)
Wake Up from SleepSupported (CAN bus activity)Supported (CAN bus activity, event system)
DMA SupportSupportedSupported
Event System IntegrationN/ASupported (event triggers, sleepwalking)