Using the Max32 PIC prototype board

This is a blog post on using a chipKIT Max32 PIC prototype board from Diligent. This is an Arduino IDE compatible prototype board, but which uses the PIC 32 range of microcontroller. I am using the max32 which is the most powerful version (there is an uno32 version as well). This board was around £36 from Farnell.

It is a very powerful micro-controller – 512kB of program memory and 128kB of data memory, all running at 80MHz. Its based upon the PIC32MX795F512 IC (around £10 from RS). It has 83 I/O lines and has a USB 2 OTG controller, 10/100 ethernet MAC and dual CAN controllers.

I am using it for the first time and want to have a play with just getting started and build from there.

To start with you need to download the IDE which works with the Max32 (called the MPIDE). This has additional boards (the chipKIT Uno and the chipKIT Max).

My starting point was to open the ‘Blink’ example and to upload that to the board. I chose chipKIT Max and port 13 (where the USB cable was connected). This loaded OK and started to blink the LED on the board (labeled LD4, but on pin 13).

So this proved it worked.

Now I wanted to get my LOLshield working.

I firstly set my preferences (click ‘File’->’Preferences’) to where my sketchbook is kept (this has all the sketches I have worked on for Arduino programs). In my case this was E:/sketchbook, but yours will be different.

I also moved the libraries used by my usual Arduino install to the libraries folder within the MPIDE.

I ran the MPIDE program and the LOLshield examples were there. I clicked on the ‘Basic Test’ example in the LOL shield examples. This did not run and came up the the error:

“fatal error: avr\pgmspace.h: No such file or directory”

Hmmmm…

It turns out that the libraries must be included in a different place to use the chipKIT PIC device. See this post for some info.

I still cannot get this routine to work and think it needs lots of re-writing to get it to work for the chipKIT Max32. This is definitely not as simple as I had been lead to believe. I think I will leave it for another day…

Leave a Reply

Your email address will not be published. Required fields are marked *