PIC32 Pinguino DIY

= Features =

This board is built with a µController of the 32-bit family PIC32MX.

Characteristics of the board

 * 32-bit MIPS M4K core running at 40MHZ


 * 128kB (MX250) / 32kB (MX220) Flash


 * 32kB (MX250) / 8kB (MX220) SRAM


 * 19 digital I/O pins with 9 shared analog inputs


 * 10 mA source/sink on all I/O pins


 * 2 UART for serial communication


 * 5 PWM outputs


 * 9 analog inputs


 * 10 bit ADC


 * Peripheral Pin Select for mapping digital peripherals to various I/O ports for design flexibility


 * Hardware RTCC provides clock, calendar & alarm functions


 * Charge Time Measurement Unit (CTMU) supports capacitive touch devices


 * Operating voltage 2.3 - 3.6V, 5.5V tolerant digital inputs.

= Board overview =



There is one reset button and one user button. When reset is pressed the board

This board can be powered by the USB connector (5V). It can also be powered by an external power supply (>5V).

TO BE DONE: schematic of a simple LDO voltage regulator with LP2950-3V3 or MCP1702

= Building Instructions =

Diodes

 * D1        5mm Red LED (+/anode = long lead)

Connectors

 * JP1       USB Type-B Female

(*) Use 2.54mm Single Row Male Header Strip if you want a breadboard-ready Pinguino, Female if you want it like an Arduino.

Others

 * SW1       Push button (Reset)
 * SW2       Push button (user button)
 * X1        8 MHz crystal (low profile)
 * U1        PIC32MX250F032B or PIC32MX220F032B (28-pin DIP package)
 * U2        7833 voltage regulator
 * Breadboard / PCB

On a breadboard


This is my version of the Pinguino32-DIY on a breadboard. I connected a 32kHz crystal to pins 11 and 12 for using the internal RTC. The wire legs of the crystal are very thin so I soldered two 0.6 mm wires to it.

Why use an external usb2serial converter? Why not use CDC for communication with the board? Well, I'm using putty as terminal software on Windows and after a reset the virtual COM port loses connection. I have to restart putty every time and that is annoying.

On a PCB


PCB and silkscreen as PDF-document
 * [[Media:Pinguino_32_diy-pcb-cu.pdf|PCB]]
 * [[Media:Pinguino_32_diy-pcb-silk.pdf|Silkscreen]]

= ICSP Programming (if required) =

In-Circuit Serial Programming (ICSP) is a way to upgrade/burn the Pinguino's firmware (bootloader).

Upgrading/burning the firmware is necessary only in two cases :
 * 1) you made your Pinguino yourself, you need to burn the bootloader only once.
 * 2) (in the unlikely event that) you crashed your Pinguino board.

If you bought a commercial board, the bootloader has been already burnt.

The .hex file for the bootloader can be downloaded at http://pinguino32.googlecode.com/svn/ide/x.4/extra/bootloaders/32bit/PIC32MX250F128B_-_HID_Bootloader.hex

The bootloader of the Pinguino32 is not open source.

Quote from a forum post of jpmandon: "Pinguino32 bootloader is based on the Microchip Application Library. If you carefully read the license of this library, you can understand it is not a GPL code but a licensed code which can only be used on Microchip product. So we decided to publish only the hex file to respect this license."

In this thread I gathered some information related to the bootloader.

Using a PICkit-like programmer
Connect the ICSP cable to the Pinguino pins (see table below) and upload the firmware with (for ex.) MPLABX or with the Microchip Integrated Programming Environment (MPLAB IPE) that comes with MPLABX.

= Testing the board =

TO BE DONE

= First Programs =

TO BE DONE

Example 1 : with PIC registers
= Troubleshooting =

Problem(s) with your Pinguino hardware?

Find help in the Forum here.

Or take a look at this list of posts to common problems.

Before posting your problem read this.

= Pins =

= Further information =

If you want to go further and dive deeper into the basics here are a number of links where you can get additional information.


 * PIC32 tutorial: First steps with MPLAB, Pickit and very good examples to digital I/O, analog digital conversion, PWM, timers, UART, peripheral pin select, SPI communication
 * Got in trouble with the bootloader? In this thread I gathered some information.