Hardware and pins, part 1 of 2 Part 1: My PIC32MZ Dev BoardPart 2: Choosing which pins to use on a PIC32MZ project

My PIC32MZ Dev Board

All 2 posts in Hardware and pins
  1. My PIC32MZ Dev Board
  2. Choosing which pins to use on a PIC32MZ project
On this page

Code for this post

Disclaimer

The files / images I'm sharing today are for my own personal development board, based on the PIC32MZ2048EFH144-I/PL. Do __not__ use this board in any project that requires super precision or in life saving equipment type of projects. I cannot and will not be responsible if you make this and somehow manage to burn your house / neighbourhood / country down. I'm uploading them in the hopes that someone starting out can learn how to make their own PIC32MZ development board, hopefully better than my own.

Background on why I started making my own dev boards

When I first started with the PIC32, the dev board options weren't awesome. I was looking using the PIC32MX in a DIP package, so it could be bread-boarded. I found myself wanting a more permanent solution and decided to look into what development boards there were available. Microchip and other companies' dev boards are fine and all, some of them aren't even too expensive. However, they're often either designed with a very specific purpose in mind or designed to attach to other dev boards of theirs and the cost very quickly gets out of control. I just wanted something I could plug Dupont cables into and I couldn't find what I was looking for, so I decided to make my own.

I pretty soon got into making my own PCBs at home using a laser printer, iron-on paper, an iron and some etchant. For years I made my own boards and they were fine. When it came to the PIC32MZ I was able to make my own PCB for the 144-pin version but I quickly began to realise the limitations of making single-sided PCBs. You can make double-sided PCBs at home but you have to be very careful to line up both sides correctly, drill the vias, solder the via pins in, etc and it turns into a lot of work very quickly. I also got tired of breathing in fiber glass when drilling all the holes for the headers. It may not seem like a lot but 200 holes done repeatedly gets a bit much. The etchant had already eaten holes in a good few pairs of pants too and I finally decided enough was enough and started looking online.

I first used Seeedstudio's excellent Fusion PCB service and found the quality to be great. I also appreciate that the different PCB colours don't cost any extra money. An alternative to them is JLCPCB. Their service is slightly cheaper and has faster and more reliable turn-around times but you have to pay extra for any PCB colour except green. A huge advantage with JLCPCB is that you can order components at their sister site LCSC and use combined shipping to save on those painful DHL shipping costs, which for me come to about $16.

Down-sides of making your own dev board

First of all, all the Harmony examples are set up to use their own dev boards, so whenever I want to use an example I have to modify code for LEDs and buttons. That's not too much bother really. The big problem, however, is that

BOARDS DESIGNED BY NOOBS LIKE ME BREAK TONS OF DESIGN RULES

While Seeedstudio and JLCPCB's prices are both good, you can get really cheap prices if you fit the board into 100mm x 100mm, double-layer. So my dev boards represent an effort to cram as much stuff as I can into that size limit while still having a working board. As such, there are too many vias, fast signals tracks are too long and routed through vias as they shouldn't be and the power and ground planes are probably more of a mess than they need be, despite multiple efforts to clean them up. Now, that out the way, my boards work fine. The USB is as fast as it should be, the ESP32 works, the SD card can be read at a very decent speed, everything works. If you can get over the worry of having an engineer looking at your board in disgust, then you too can make your own PIC32MZ dev board.

So why? Well, this is my hobby, I enjoy it. I use my dev boards to get modules, motors, LCDs and all sorts of things to work before designing specific boards for separate projects. It's a kitchen sink. A very clogged up kitchen sink. And today I'm going to share all the files for it with the Internet. If anyone even reads this, I'm sure they'll leave some delightful comments but eh, I'm uploading them all the same.

Overview of this dev board

First, this is what it looks like when assembled by a noob (me). Top:

PIC32MZ - Scorpio Dev Board - Top view

Yes, the erroneous "BUTTON 2" text has been removed in the uploaded Gerber files.

Bottom:

PIC32MZ - Scorpio Dev Board - Bottom view

Yes, the scorpion motif was cheesy as heck and has been removed (also, it was downloaded from a royalty free clipart site I can no longer find the link for).

This dev board, being based on a kitchen sink design philosophy, has a lot going on with it. Most of the extras can be left out entirely without affecting the PIC32 at all. I will mark these extras with a *. The list:

  • SD card attached in SPI mode to SPI channel 2 (*)
  • CS4344 audio DAC attached in I2S mode to SPI3 (*)
  • 8MB VTI7064 PSRAM attached via SQI (*)
  • 128MB W25N01GV flash memory attached to SPI5 (*)
  • Parallel Master Port (PMP) driver 16-bit TFT LCD connector for SSD1934 displays with capacitive touch (*)
  • HD44780 compatible text LCD port connected to the PMP (*)
  • FT232RL connected to UART4 to allow communications with PC (*)
  • USB host connector (*)
  • Stereo PWM audio output connector with single stage RC filter designed to work at 44.1kHz (*)
  • ESP32-WROOM-32 module connected to UART2 and SPI1, with connections to allow PIC32 and ESP32 to wake each other (*)
  • Power via micro USB port in either debug mode (with FT232RL) or device mode (two separate ports)

So basically, a lot of stuff, some of which is a hassle to solder by hand and none of which is necessary except for the USB port which provides power to the PIC32 chip. If you don't even want that, you could also power it directly via the ICSP connector using a PICKit or other programmer but bear in mind that needs to be 3.3V.

The ESP32 has been added very recently and in rather a slap-dash fashion. It is supplied by it's own 3.3V regulator and can be entirely disabled by removing the jumper near it labelled "ESP32".

I have tried to use 1206 sized SMD components to make it easier to hand solder but there are one or two places where I ran out of space (/willpower) and so used 0603.

Bill of Materials (BOM) and where to buy the components

I have put together a list of components for use when soldering and a Bill of Materials with links showing where to buy the components.

Here are the Gerber files for this project.

Here are the Eagle files for this project.

Almost, but not all, of my example code on this site was made with these ports in mind.

11 comments
  1. colle

    Nice work!!!
    I'm planning to make a rev B of mu board too.. just a couple of layout correction (damned SPI 3).. I'm thinking to swap from EFH to EFM.. everything should be the same except that the EFM has the Crypto engine...
    I'm thinking to use also a 144 pin device instead of the actual 100 but.... this means redo all the layout.

    1. Aidan Author

      Hi colle, thanks. What did you do wrong with SPI3? I prefer the 144-pin devices for dev boards because there's nothing missing. The 64-pin device, for example, only has 8-bit PMP which sucks. At least the 100-pin device doesn't have that, it just has less GPIOs (as far as I know).

      I chose the EFH because it can go to 252MHz but the EFM also interests me because of the crypto engine.

      I know moving from 100 to 144 is a big hassle and it's a lot of work but I think it's worth it. Good luck! :)

  2. rahul vijay

    Awesome Work !!!

    Your Work is a kind of light for Electronic hobbyist. Could you possibly share Schematic (pdf) . I would like to make this board and try. if possible u could share some code also . it will be great. my id - rahultheengineer@gmail.com

    Thanks for great work.

    1. Aidan Author

      Hi there and thanks for stopping by,

      I do plan on sharing the schematic, just need some free time :)

      All the code I have is already on the site, check the other posts.

  3. Adan

    Awesome stuff as always!

    I see an ESP-32 module on your board. I've used ESP-32 dev boards but never standalone (I flashed it with the Espressif Arduino SDK). I had a decent experience working with it, however one of my friends said it's okay for tinkering but that better wifi chips exist elsewhere.

    Was curious, how do you like it and would you recommend it the designated wifi chip?

    1. Aidan Author

      Hi Adan,

      Thanks for the comment.

      To be honest I haven't had much time to experiment with it because of work :) I chose it because it's a popular wifi chip that can also do bluetooth and I wanted to see if I could get it to work with the pic32.

      What other wifi chips do they recommend?

      1. Adan

        He recommended cypress, but I've been trying to research for microchip iot chips since I'm using a lot from them anyways (pic32, eeprom, ethernet, etc).

  4. Aidan Author

    Hi there,

    Thanks for stopping by. Sure, I'll give you the files but they're a bit of a mess and probably horribly designed, so be warned. I haven't experienced any issues with them and my code at least :)

    The schematic and board files are in Eagle.

    Sometime in January I'm going to be uploading a re-designed (and simpler) version of my board so if you can wait I'd suggest getting that instead.

    The files can be downloaded at the end of my post (Disqus hyperlinks seem to be utterly broken)

  5. Gatvol!

    Hi Aidan,

    I have read your posts on the PIC32MZ and it has helped me a tremendous amount - so thanks for taking the time to put this on the internet and sharing! It is much appreciated.

    I am busy with a similar board making use of the PIC32MZ2048EFM144, a Winbond W25N01GV Flash chip for external storage, as well as an SD Card to name a few of the components on the board. My problem is that I am struggling to get the Flash working. I have connected the flash chip to the PIC32MZ via the SQI interface (also using DMA) and I am using Harmony 3 (which I know you don't like). I am also using FreeRTOS.

    My request is for you to please make your code for this board available. I would like to see how you are communicating with the Flash as well as the SD card.

    Thanks in advance!
    Ben

    1. Aidan Author

      Hi Ben,

      The only SQI code I have working is for communicating with an SQI PSRAM chip connected to the PIC32MZ, would that be OK?

  6. Cosmo Arun

Comments are hosted by Disqus, which loads only when you ask for it.