ChipKIT BB32

This is an implementation of a  ChipKIT platform on a Solderless Breadboard, using the Microchip PIC32MX250F128B that is now available with a Bootloader preinstalled. This implementation is based on the Digilent ChipKIT DP32, but modified to make it cheaper, flexible and cost effective for Hobbyists and Students in 3rd World Countries such as my own. (Shipping costs and import duties can be crippling). The circuit uses the Right Hand side of a Standard Solderless Breadboard and is designed for the smallest possible footprint. This means that more than half of the breadboard, on the Left Hand side, is available for conducting experiments and constructing interface modules, as the image shows.

Hardware:

Here is a closeup of the circuit itself,  it should provide sufficient information for most people to be able to build the circuit, assuming they have built circuits on a Breadboard befor.  For the wiring I suggest solid core telephone cable. Offcuts or discarded cable can often be found  on building sites or during office renovations and provide several colours of insulation. CAT5 cable could also be used.  As this is a semi permanent installation on the Breadboard I recommend that the wires be cut and bent to size for a neat and reliable construction. Some notes on the components used:
  • The Voltage Regulator is a LM1117-33, the Pin marked Adj is actually the Ground Pin.
  • The Electrolytic Capacitor is a 10uF, oriented so that Positive goes to the Center Pin of the regulator.
  • The 10uF capacitor on the PIC32MX is a Low ESR tantalum capacitor, negative to Ground.
  • The 2 Capacitors on the 8Mhz Crystal are 22pF ceramics, but any close value should do, it may even oscillate without them on a breadboard.
  • All other Capacitors are 100nF (0.1uF) ceramics, any 100nF capacitors will do.
  • All Resistors are 1K with the exception of the one on the LDR which is 22K. (it forms a voltage divider so choose one that best matches your LDR Characteristics).

Features:

USB Power is regulated down to 3.3 Volts for the benefit of the PIC32MX Device. The Breadboard may be powered via USB or the ICSP Header, but it has no protection diodes. It is advisable not to power it via the ICSP Header when plugging it into a USB port.  If it is powered via the ICSP Header,  set the voltage to 3V3 only. A 5V rail is provided as the last row on the Right, to facilitate interfacing to 5V devices such as LCD Displays. This is unregulated 5V directly from the USB Header. The layout is orientated so that the 5V Tolerant PINS are located near to the 5V rail. The majority of the ChipKIT PINS are located to the Left of the device and are readily accessible by the empty portion of the Breadboard. This block of PINS includes the Analog Pins. An ICSP Header is included and serves several roles. It may be used to Install or Replace the Bootloader, Program the board with MPLAB or to connect a PICKit Serial Analyzer / Logic Analyser or UART Tool to assist in Experiments and Debugging. It is only permanently connected to the power bus, use temporary jumper leads to connect to  the appropriate breadboard rows, depending on your application. The LED’s are connected to ChipKIT PIN# 13 and 14, so that the Standard Arduino Blink Sketch and others should compile and run without modification. When addressed in MPLAB they are RB2 and RB3 respectively. The Prog Button is available for use in Sketches (User Programs) as ChipKIT PIN# 17 or RB4 in MPLAB. ChipKIT PIN Numbers are indicated on the Device and Repeated on the Breadboard. Users may find it useful to print out the above Image as a reference whilst using the board. The Key is as follows:
  • The Numbers correspond to ChipKIT PIN# not Microchip Port or Pin Numbers i.e. digitalRead(17) would read pin 9 (RB4) of the PIC32MX package, analogRead(A0) would read pin 24 (RB13).
  • Numbers in RED are 5V tolerant Pins.
  • Numbers in GREEN are both Analog and Digital capable PINS and will work with both the digitalRead() and the analogRead() functions.
  • Analog Channel numbers are shown on the Breadboard Overlay along with the corresponding Digital PIN numbers.
  • Numbers with a ~ symbol may be connected to the OC Registers and used as Hardware PWM PINS.

Software:

Digilent have kindly supplied a Zip file that contains all the files and Instructions  needed to update your MPIDE to support the ChipKIT DP32. The same files will work with this BB32 implementation. http://www.digilentinc.com/Data/Products/CHIPKIT-DP32/DP32_variant.zip It should not, however, be necessary to modify the MPIDE if you are running a newer test version.  I have used the BB32 successfully with both mpide-0023-windows-20130602-test and mpide-0023-windows-20130609-test. If you have a blank device, Digilent also provide a copy of the Bootloader .HEX file.  http://www.digilentinc.com/Data/Products/CHIPKIT-DP32/chipKIT_Bootloader_DP32.zip You will need a PICKit3 or better to install it on the Device, but it can be done with the Breadboard in situ by connecting the ICSP Header pins to the appropriate PIC Pins as follows:
  • Mclr to PIC PIN# 1
  • Dat to PIC PIN# 4 (Chipkit PIN# 11)
  • Clk to PIC PIN# 5 (Chipkit PIN# 12)
If you have a PICKit3 then you will already be familiar with MPLAB, but in a nutshell, start a blank project, select your device as PIC32MX250F128B, File->Import the bootloader.hex file. Set Programmer->PICKit3 and then use the Program Button in the toolbar to upload. Disconnect the PICKit, Plug in the USB cable and if all is well the device will enumerate and you will get a new hardware found notification. If windows requests a driver it is located in the MPIDE directory: C:\….\mpide-0023-windows-20130609-test\drivers\chipKIT Drivers It should install as a stk500 device.

Getting started:

Run MPIDE.EXE from the folder you unziped too. select the Board:

Tools->Board->ChipKIT-> ChipKIT DP32

then

Tools->Serial Port and select the Port that was created by the stk500 driver

When in Bootloader Mode LED2 (RED) will flash at ~ 4Hz To test the Hardware run this Sketch: BB32_test.pde //_________________________________________________________________ // //  BB32_Test.pde // //  C.A.Roper – 2013/07/17 // //  Hardware confidance test Software for the CHIPKit-BB-32 //  CHIPKit compatable Breadboard circuit based on PIC32MX250F128B. // //  Tests Digital Output to LED’s //  Teats Digital Input from Prog Button //  Tests Analog Input from LDR //  Tests Serial Output Via USB //  Tests Serial Input from USB //_________________________________________________________________ // int Last; int State; int Character; void setup() { Serial.begin(19200); pinMode(17, INPUT); pinMode(13, OUTPUT); pinMode(14, OUTPUT); } void loop() { if(Serial.available()) { Character = Serial.read(); if(Character == ‘1’) State = 1; else if(Character == ‘0’) State = 0; else if(Character == ‘t’ || Character == ‘T’) State = !State; } if(digitalRead(17)) { State = !State; } if(State != Last) { digitalWrite(13, !State); digitalWrite(14, State); Serial.println(analogRead(A0)); } Last = State; delay(250); } Whilst uploading LED1 (Green) will flicker. Press the Prog Button to toggle the LED’s and open the Serial console to see the ADC Reading and to issue commands. To return to Bootloader mode and upload other Sketches:
  1. Close the Serial Monitor if open.
  2. Press and hold the Prog Button.
  3. Press and release the Reset Button.
  4. Release the Prog Button.
The Green LED will go out and the RED LED will Flash. Thats it, all that remains is to have fun with your shiny new ChipKIT. Don’t forget to Join the ChipKIT community and  read about new ChipKIT developments and uses. Cheers Chris http://caroper.blogspot.com/
VN:F [1.9.22_1171]
Rating: 10.0/10 (3 votes cast)
ChipKIT BB32, 10.0 out of 10 based on 3 ratings

Published by

Chris Roper

South African

9 thoughts on “ChipKIT BB32”

  1. Hello Chris,

    Nice Write up! Is the UART bootloader available for PIC32MX150?

    Thanks,
    Sudhir

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Hey Sudhir:

      There is a UART bootloader in the bootloader source files here:

      You will need MPLAB X IDE and the MPLAB C32. I’m planning on doing a tutorial as to how to create bootloaders for the chipKIT platform once I get some time.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
      1. Hi Marc,

        Thanks. I have downloaded it and I shall try it out.
        Sudhir

        VA:F [1.9.22_1171]
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
  2. Thanks Sudhir,

    And yes there is at the link Marc posted.
    I am working on a few more iterations that cover different config options but have not created board definition files for them yet. This one uses the DP32 Board Definition, my definition will be different so I will only release it when I have fully tested the prototype.

    Cheers
    Chris

    VN:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. This link has the iterations I have released so far:
      [url]http://chipkit.org/forum/viewtopic.php?f=17&t=2438[/url]

      I will update that and also my blog at:
      [url]http://caroper.blogspot.com[/url]
      as I release them.

      VN:F [1.9.22_1171]
      Rating: 0.0/5 (0 votes cast)
      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
      1. Hi Chris,

        Thanks. I am going to try it out on a PIC32MX150xx.
        Sudhir

        VA:F [1.9.22_1171]
        Rating: 0.0/5 (0 votes cast)
        VA:F [1.9.22_1171]
        Rating: 0 (from 0 votes)
  3. Hello Chris,

    great writeup! I had a couple of PIC32MX250F128B lying around, so decided to try your circuit. Could not get the bootloader loaded, until I noticed that you have the ICSP connector CLK and DAT pins reversed on your diagram. After that, everything worked. I have made that mistake a few times, too. Better get that fixed before someone with less experience starts pulling his hair out!

    Thanks,

    Pierre

    VA:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  4. Hi Chris,
    I’m a newbie to the ChipKIT arena and was wondering where I can download your BB32 bootloaders that you mention on your blog. I was at your blog but did not see any links to download your bootloaders. I’m particularly interested in the USB version where you moved the Program pin away from the RTCC oscillator inputs.

    Thanks for you work and contributions!

    — Rick

    VN:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  5. Hi Chris,

    Just after posting the request above, I found your link to the bootloaders. So, thanks again!

    — Rick

    VN:F [1.9.22_1171]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Comments are closed.