![]() |
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: GermanyPosts: 33 |
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 |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |