Jump to content
  • 0

chipKIT Max32, Network Shield, and CAN BUS


JColvin

Question

A customer on our website asked the following question:

Hi,

I purchased some CHipkit max32 boards and chipkit network shields for use with the CAN BUS features.

I haven't been able to find any official library or demo for the CAN BUS on chiptkit max32, all I can find is some public github projects with code from 2011 or 2012. What should I be using to start working with CAN BUS controllers on the chitkit?

The response is below.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Hello, 

The only official library demo that I am aware of is available on the chipKIT Network Shield wiki page in the first link under the Downloads section. I know that the chipKITCAN demo does compile for the Max32, but I have not tested out the code for myself to see how it performs.

Let me know if you have any more questions.

Thanks,
JColvin

Link to comment
Share on other sites

I have a question about the Plib.h file that is missing when we use the Arduino IDE or a new version of the MPIDE. I now ther are issue withe library's, but what is the option when I want to use a newer version of MPIDE or Arduino IDE and use the build in CAN bus of the MAX32 is there one or is there another library that I can use?

 

Link to comment
Share on other sites

Hi @E10,

The plib.h works in MPIDE but not in Arduino because the library is not opensource. If you were wanting to get the can demo to work in Arduino you would have to remove all reverences the library uses to plib.h and write directly to board you are using. This is a very large task. Unfortunately, there is currently no other library that replaces plib.h. 

thank you,

Jon

Link to comment
Share on other sites

On 4/24/2017 at 3:31 PM, jpeyron said:

Hi @E10,

The plib.h works in MPIDE but not in Arduino because the library is not opensource. If you were wanting to get the can demo to work in Arduino you would have to remove all reverences the library uses to plib.h and write directly to board you are using. This is a very large task. Unfortunately, there is currently no other library that replaces plib.h. 

thank you,

Jon

I am not sure this is correct. I have been able to build the CAN demo in Arduino IDE. You obviously need to install the peripheral libraries for such compiler.

I do have an issue though, and it is at the time of running the demo. It is not very clear in the documentation how to do this. Only instructions provided are for MPLAB and soem kind of daught board.  Is it possible to just load the canDemo into a chipkit max32 and run it? do we need some wire connection to allow CAN1 and CAN2 talk?

Link to comment
Share on other sites

Hi @c0y3,

On the resource page for the chipKIT Network Shield here is where the demo can be found. After you click on first download and agree to the terms from microchip there is a document pdf that talks more about the usage of the can demo. This documentation also explains why you need the network shield for this demo as well. 

cheers,

Jon

Link to comment
Share on other sites

On 2-6-2017 at 3:30 AM, c0y3 said:

I am not sure this is correct. I have been able to build the CAN demo in Arduino IDE. You obviously need to install the peripheral libraries for such compiler.

I do have an issue though, and it is at the time of running the demo. It is not very clear in the documentation how to do this. Only instructions provided are for MPLAB and soem kind of daught board.  Is it possible to just load the canDemo into a chipkit max32 and run it? do we need some wire connection to allow CAN1 and CAN2 talk?

Yes you need some wiring to do this. I don't now if you have the network shield or not but if you have the net work shield you can connect the CAN1 HIGH to CAN2 HIGH and CAN1 low to CAN2 LOW (in the datasheet can you find where thees pins are located https://reference.digilentinc.com/_media/chipkit_shield_network:chipkit_networkshield_rm.pdf) if you don't have the network shield you need to order the mcp2551 you can find how to connect this in https://reference.digilentinc.com/_media/chipkit_shield_network:chipkit_networkshield_sch.pdf

http://store.digilentinc.com/chipkit-network-shield-ethernet-for-mega-r3-platforms-limited-time/

Good luck with me I hope this answers your question

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...