Created Wed, 20 Feb 2013 18:30:20 +0000 by dallowgill
Wed, 20 Feb 2013 18:30:20 +0000
Below is just some help for anybody, who after several months not using Chipkit32 board and Arduino MPIDE, has forgotten how to reload the bootloader into PIC32MX795F512L. Or for any Newbies struggling with this. Hope it Helps :)
How To Program Digilent Max32 board to reload the Arduino MPIDE "BOOTLOADER"
Connect Pickit3 Programmer to Max32 Board
Then Pickit3 to PC via USB Cable
Load up MPLAB IDE v8.80
On Menu Bar Select 'Configure' then 'Select Device'
On the 'Select Device Dialogue' pull down the 'Device List' and Select PIC32MX795F512L
This is the correct Device for MAX32 Board if you fail to select this device then you will get the dreaded 'Device ID error' from MPLAB when it detects the Pickit3 programmer.
Next from main menu bar select 'Programmer' then on drop down menu click on 'Select Programmer' then on next menu that pops up select 'Pickit3'.
The programmer will now be detected, this is shown in 'Mplab Output Window' but you get the error message as follows:
PK3Err0045: You must connect to a target device to use PICkit3.
This will be because you have not powered Max32 board from Pickit3, so you need to click on programmer on main MPLAB menu again and on drop down menu select 'Settings' on the PICKIT 3 Settings dialogue that pops up select from its main menu 'Power'. Now make sure the Voltage slider is set to 3.299 then click in the box that says 'Power target circuit from PICkit 3. Then click 'Apply' then 'OK'.
The Mplab Output window should now show something like this: Device ID Revision = 04300053
Now on main Mplab menu bar click 'File' then 'Import' go to the directory where you have stored the HEX Bootloader --> arduino-bootloader,X.Max32 in the 'Open dialog' select it and open it or just double click the file name.
On the main Mplab menu bar select the Icon that when hovered over with mouse says 'Erase Flash Device'. selecting it will perform an erase on Max32 Flash mem.
In the Mplab output window you should see the imported file. Now from main Mplab menu again select programmer and on drop down menu click on 'Program' after some activity on programmer and Max32 you should be rewarded with the flashing LED driven by the newly installed Bootloader. You can now shutdown MPLAB disconnect Pickit3 and connect USB to Max32 for programming from Arduino MPIDE.