Showing posts with label PIC32. Show all posts
Showing posts with label PIC32. Show all posts

Friday, December 2, 2011

USB PIC24 and PIC32 SPDIP Arduino

PIC24FJ64GB002 shown
Microchip has just released a SPDIP-28 PIC32.  This chip is pin compatible with the PIC24 which I have been developing for, and my latest toying has been with Arduino style boards, so I was determined to combine the two.

In the last week I have developed a prototype USB Arduino format board using a PIC24 or PIC32 as its CPU.  The Arduino format consists of the standardized 8 and 6 pin headers for I/O and power.  This was accomplished starting with an empty Arduino shield prototype board and building up as a PIC single board computer instead of a shield.  Now standard shields can be attached to this board.

The two CPUs I am targeting to support with this board are PIC24FJ64GB002 and the recently released PIC32MX220F032B.

The power circuit, ICSP (on left), and USB have been tested.  The PIC24 running a CDC (Serial over USB) project is recognized by the host PC.  Next step is to test the FTDI serial connector (on right), and all the analog/digital pins.  Following that is to add a crystal and capacitors to get USB support for the PIC32 (I wonder if I can do that on a shield?). All pins are exposed via the Arduino shield interface, so it is super expandable.  The red LED is for 5V power, and the green LED is for 3V3 power.  The button is the reset switch.  No user I/O are provided, must be accomplished by add ons.

The missing piece is the Arduino development environment support for PIC24 and this low end PIC32 chip.  That's a pretty big missing piece.  For now I can develop using Microchip's MPLAB 8 and MPLAB X.  I am hoping to use the chipKIT Arduino Development Environment for this board soon as it would be nice to program with Arduino sketches and C++. 
PIC32MX220F032B shown
Underbelly

Tuesday, September 6, 2011

My own first PIC32 Development Board

Here is a USB PIC32 development board that is in progress.  I bought a bare 64-pin PIC32MX795F512H which is the highest end Microchip 32-bit CPU, except for having 36 fewer pins pins than its close sibling.  This CPU has 512K Flash, 128K RAM, and runs at 80MHz.

It was soldered to a breakout board that is connected by dual row 0.1" 16-pin headers so it can be mounted in sockets on a standard solder breadboard.  It has three symmetrical 8 pin headers which expose shared SPI/UART (total of 6 RX/TX pairs), and power lines.  Jumpers choose between USB host and USB device functionality.
The first test of this board was as a four port RS-485 monitor.  I was able to enhance the monitor's protocol to support four sources, then enhanced it as a bidirectional adapter.  The code is built on Microchip's USB device CDC sample and shared among various PIC targets, so the code is also supported on other various 8-bit and 16-bit PICs too.

A planned test is to breakout the RMII/MII lines to an Ethernet PHY and test the Ethernet capability of this CPU.  I purchased a QFN 36-pin SMSC LAN8700 PHY but unfortunately I cannot find a compatible breakout board for it.  Nine pin sides seem to be an odd number, and the breakouts I have tried are built for even numbered pins per side making this one just a bit too small to work with the traces.  My next plan is to try a QFN 24-pin SMSC LAN8720 PHY.

Another plan is to get it to work with the chipKIT Arduino-Compatible Prototyping Platform so it can be programmed in C++.