Go Down

Topic: Unified CAN Library (Read 2620 times) previous topic - next topic

McNeight

I've written up a cross platform CAN library that builds on some of the excellent work out there done on individual CAN controllers. This library allows you to communicate with multiple types of CAN controllers using a consistent API, making CAN communications across development platforms easier through Arduino.

The idea behind this CAN library is to use a similar approach to Adafruit's Unified Sensor library by standardizing CAN function calls, frame structure, filters, masks, buffers, etc to be used with a wide variety of CAN controllers. This library currently supports the following controllers:

The library is available at https://github.com/McNeight/CAN_Library. If you use it, feel free to drop me a line.

-Neil

teddyz

I gave it a try, but I got "Your CPU & CAN controller are currently unsupported.". I have an MCP2515 connected to the SPI bus. Perhaps it did not see it. I can understand if it didn't recognize the CPU as it is embedded in an ESP8266. :)

teddyz

FYI: Also, I got this message using Arduino 1.6.5: WARNING: Category '"Communication"' in library CAN_Library is not valid. Setting to 'Uncategorized'

kochevnik


So I tried this library with two Due's and the attached MCP2515 board

I first tested all these 2515 CANBUS boards with UNO's and the special 8 Mhz mcp2515 canbus library here:

https://github.com/Flori1989/MCP2515_lib

which worked fine once I had my wiring straightened out.

I'm using the same canbus board (running at 3.3v) and cant seemt o get them to communicate.  The datasheet for the mcp2515 and the attached transceiver says both can wrok at either 5v or 3.3v.

Now posting this, I'm wondering if it is the 8mhz crystal; that is causing the issue ?

be nice to get these cheap canbus boards working with the dues - and yes I know the due has canbus but it requires wiring up can transceivers and what's the point ?  Much easier and more robust just to use an external board.

Worst case, I offload all the canbus stuff to unos but be nice to get the due's to work with this setup.

Anyone pulled this off ?


Clay-tron

KOCHEVNIK the TJA1050 on the Niren MCP2515 CAM module uses 5V VCC. (4.75V min)


Neil has the unified library been updated to include the 8Mhz Niren MCP2515 board?

calu08

@Kochevnik did you managed to upload the examples files to the due?

I'm trying to use the niren mcp2515 can module with a due and I didn't found a suitable library to do so.

Does anyone has an idea?


eragonsmith


I have the same problem, it's impossible even to compile with the due and an external MCP2515. Didanybody find a solution? or an appropriate library?

Thank you very much in advance.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy