GithubHelp home page GithubHelp logo

adamczykpiotr / pico-mcp2515 Goto Github PK

View Code? Open in Web Editor NEW
61.0 5.0 19.0 11 KB

Raspberry Pi Pico MCP2515 CAN-Bus Interface Library

License: MIT License

CMake 8.53% C 3.24% C++ 88.22%
raspberry-pi raspberrypi can-bus canbus pico mcp2515 canbus-communications raspberrypi-pico pi-pico cpp

pico-mcp2515's Introduction

Raspberry Pi Pico MCP2515 CAN interface library

This Raspberry Pi Pico library is a ported & optimized version of the magnificent library arduino-mcp2515 by autowp.

Optimization

This library was optimized to use SPI transfer of multiple bytes in a single function call. This is contrary to the original code where for loop was heavily used. Theese optimizations might seem insignificant as they shave only few microseconds each time but they surely add up. If the only goal of the microcontroller is to poll CAN-Bus frames, the speedup can reach roughly from 20 to 40% depending on frame byte count!

Benchmark used with frame polling:

Frame bytes Before [µs] After [µs] Speedup [%]
0 35 29 22.8
1 37 29 21.6
2 39 30 30.0
3 41 31 32.3
4 43 32 34.4
5 45 33 36.4
6 47 34 38.2
7 49 35 40.0
8 51 36 41.7
Average 43 31.9 33.0

This software is written by loovee ([email protected]) for seeed studio, updated by Dmitry (https://github.com/autowp) and then ported by Piotr Adamczyk https://github.com/adamczykpiotr and is licensed under The MIT License. Check LICENSE.md for more information.

Contributing to this software is warmly welcomed. You can do this basically by forking, committing modifications and then pulling requests (follow the links above for operating guide). Adding change log and your contact into file header is encouraged. Thanks for your contribution.

Seeed Studio is an open hardware facilitation company based in Shenzhen, China. Benefiting from local manufacture power and convenient global logistic system, we integrate resources to serve new era of innovation. Seeed also works with global distributors and partners to push open hardware movement

pico-mcp2515's People

Contributors

adamczykpiotr avatar eepykami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pico-mcp2515's Issues

Adding information what IO-pins to use

Hi Adam,

I have looked for but did not find any information about which IO-pins are used for the SPI-interface.
I am even more confused as the Pin-outs that can be found for the RP2040 pico show four sets of IO-pins that are named SPI-0.

Huh ? Now which IO-pins do I use? I guess the pico can not autodetect them.

Thank you.

Just wanna to say - "Thank you", everything works.

How to use this library with pico?

Hi, I have tried downloading the library and adding it as a zip library, but it is returning me this error.
image

Could you advice on how I could go about using your library for the raspberry pi pico? Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.