A project by Kevin O’Connor,
can2040 – adding CAN support to the RP2040. The RP2040 doesn’t have a CAN peripheral, but Kevin wrote code for the RP2040’s PIO engine that can receive and send CAN packets. Now we can all benefit from his work by using this openly available CAN driver. This library is written in C. So it’s a good fit for the lower-level hackers among us, and in all likelihood. It wouldn’t be hard to make a MicroPython wrapper around it.
The CAN bus needs a peripheral for the messages to be handled properly. And people have been using external chips for this purpose until now. These chips, Kevin tells us, have lately been unavailable due to the chip shortage, making this project more valuable. The documentation is extensive and accessible, and Kevin details how to best use this driver. With such a tool in hand, you can now turn your Pico into a CAN tinkering toolkit, or wire up some CAN devices for use in your own projects!
Read More: PIO | Hackaday