Programming Your Chipkit Dp32 Using the Arduino IDE

 

  • chipKIT boards typically have far more memory and computing power than many Arduino boards, and as a result, they are so much better at manipulating data.
  • On the other side, the Arduino IDE is easy to use and understand.Programming Your Chipkit Dp32 Using the Arduino IDE
    • So what if we could interchange the Arduino board with the chipKIT while still programming with the Arduino IDE. Lets see what happens.

    The following instructable shows how to program the chipKIT dp32 using the Arduino IDE

    Step 1: Download and Install the Arduino IDEDownload and Install the Arduino IDE

    1. Go to arduino.cc and download the Arduino Software as per your Operating System (Windows, Mac, Linux)

    2. Follow the installation guide step-by-step and install the software

    Step 2: Install ChipKIT CoreInstall ChipKIT-Core

    To be able to program on different architecture and processors you need to install the desired core. In this scenario, we need to download and install the chipKIT core and can be done using the method below.

    1. Go to chipKIT.net and you can see various method to install the chipKIT core

    2. In this instructable we are going to be using the first method which is “Auto install via URL from within Arduino IDE“.

    • Open your Arduino IDE
    • Go to File -> Preferences. A dialog box will appear and at the bottom of the dialog box you can see a text entry field called “Additional Boards Manager URLs:”

    3. From the Arduino IDE select Tools -> Board -> Board Manager and scroll down to select your chipKIT dp32 board. You can also use the search box to find your chipKIT board

    4. When you see your board click once in the box that appears and then you can see the install button

    5. Hit install and it will download and install all the chipKIT core components needed

    6. Click the close button to close the Board Manager Window

    Step 3: Restore the Boot Loader on Your ChipKITRestore the Boot Loader on Your ChipKIT

    This step will show you how to restore your chipKIT bootloader, in the event that it has been erased from a chipKIT- compatible board. This operation is required if you have used MPLAB X to program the board, causing the bootloader to be over-written.

    We need to download the bootloader for the chipKIT from the resources page.

    • Download the bootloader from the resources page
      1. Go to the resources page
      2. Scroll down to “Design Resources”
      3. Download the Bootloader
    • Once you have downloaded the Bootloader we need to upload the file onto the chipKIT board
      1. Open MPLAB X IDE
      2. Connect your chipKIT board and your programmer
      3. Create a new project
      4. Select “Categories -> Microchip Embedded” & “Projects -> Prebuilt (Hex, Loadable Image) Project” and hit next
      5. Add the downloaded bootloader file using the browse button and select your device appropritately and hit next
      6. Give the project a suitable name and hit finish
    • Now you need to program the device using the “Make and Program Device Main Project” button that appears on the top centre of the window
    • Once the program is verified and completed the LED LD1 will start blinking which means the bootloader has been successfully uploaded to the board and is ready to program using the Arduino IDE

    Step 4: Arduino Program on the Dp32 BoardArduino Program on the Dp32 Board

    Now that you have the bootloader on the dp32 working you can run any program using the Arduino IDE

    • Start the Arduino IDE
    • You can see there are many example codes written for you. Go to “File -> Examples -> Select whichever you want”
    • Before compiling and uploading the code you need to select the port to which your board is connected
    • Go to “Tools -> Port -> Select one”. (Select the micro USB port)
    • Verify your code
    • Upload your code on the dp32 and your program is running

    Step 5: Common ErrorsCommon Errors

    • While uploading your program to your chipKIT board you may come across this error “No Target Found”. To solve this issue you may need to reload the bootloader on the chipKIT and then reprogram your board. Hence it is advisable to keep MPLAB X open and upload the bootloader whenever necessary.
    • Some may have this issue even if you perform the above step. It might be the case that you are using a low quality micro USB cable.
    • While selecting the board and port from the tools in the Arduino IDE make sure that you select the right ones as per your board and serial I/O port.

 

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter