Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 01:08 01 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CAN-bus with picomite/webmite and MCP2515, proof of concept

Author Message
Arne
Newbie

Joined: 05/01/2025
Location: Germany
Posts: 33
Posted: 01:23pm 04 Aug 2025
Copy link to clipboard 
Print this post

As I had no idea about CAN-bus I decided to make an absolute minimum test-program for the MCP2515 module to learn something about it. 3 picos (2xRP2350 and 1xRP2350W) with MCP2515 modules have been connected together to one CAN-bus line with a length of about 2 meters. For the test all picos used the same program. Each pico sent one data frame every second with increasing ID. Receiving of frames were initiated by the MCP2515 controller via interrupt line to the relevant pico.

Additional features of the MCP2515 as e.g.
- extended data and remote frames
- data filtering
- etc…
have not been taken into account.

The following test-program is based on my evaluations of the MCP2515 data sheet.
Due no failure handling is implemented it can be possible that the data transfer via the bus suddenly stops e.g. when the same IDs were sent by different nodes at the same time. The controller then initiates a failure and waits for instructions how to go on…

CAN.zip

After my tests here the conclusion:

Implementing a CAN-bus driver as e.g. for the MCP2515 into the picomite (firmware) can be a big benefit because interfacing to several industrial systems/sensors/actuators can be done. Also distributed systems with several picomites for home automation, robotics etc. can easily be designed.

In addition:

- It is a robust industrial standard field bus
- Can have a maximum length of about 5 Km with minimum cabling (2 or 3 wires)
- Depend on bus length/drivers it can handle up to 100 nodes.
- In standard operation 2048 frames with 8 byte data can be transferred.
- Extended and remote frames are possible

Maybe the a.m. infos are interesting …

@Peter: What are you thinking about implementing a CAN-bus driver as e.g. for the MCP2515 into the picomite firmware? For hobby programmers (as me) this can make life much easier (and the code more compact).

Arne
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025