chipKIT® Development Platform

Inspired by Arduino™

Questions about PIC32MM + CP2014 USB serial project

Created Mon, 21 Nov 2016 21:40:16 +0000 by gh0stwriter


Mon, 21 Nov 2016 21:40:16 +0000

So, I am working on a board that will use PIC32MM and some newer features I haven't including is some of my older designs. Power bus voltage detection, MEMS primary clock circuit with ideal clock rate for my needed baud rates, and essentially converting the project from AVR 32u4 to PIC32MM with some 5v to 3.3v differences and slightly more complex regulation circuitry where I was previously using a bulletproof TI TL783 LDO regulator. I'm hoping the PIC32MM will give me a lot of of computational horsepower advantage over the 32u4@16Mhz. Another reason for switching to PIC32MM in my case is built in IRDA... which I'll be using the remappable UART for... my board also has dedicated PICKIT3 and EJTAG ports.

There may be an Optoisolator thrown on this board as well depending on how well the open drain 5V IO works out, and a TDFU 4101 IRDA chip.

What direction should I be looking to get a PIC32MM board working with the chipKit toolchain, fancy Arduino functionality,like digitalWrite is not nessecary for me but I am interesting in getting a bootloader working at least?

So my device is usually self powered from a higher voltage source, with regulators down to 5v for external IO and 3.3v for the PIC32MM. I have attached a schematic for the USB serial circuit I am planning on using but am not sure what bootloader I should be using. My previous board was 32u4 based using the catarina bootloader.... and I would like to keep the functionality virtually the same with the PIC32. I expect since I am using a separate USB serial chip I will need to use a serial bootloader rather than a virtual com port one. And if I do that is there anything I need to do with the virtual com port chip to ensure it is picked up by the programmer?

Also another concern I have is switching from vbus power to the self powered bus. I have a voltage divider and protection circuit routed to CLC1 as well as an analog pin... with the plan being to USE CLC1 to enable/disable the high voltage bus power regulator on removal/insertion of the USB programming cable via my detection circuit. Does that seem reasonable or do I have a hole in my thinking about that?

The board I am currently making is not a personal project but if I like PIC32MM well enough it might make sense for me to throw some boards up on tindie or some such! Sorry for the long post but hopefully someone will find it intriguing enough to respond to!


Tue, 22 Nov 2016 16:05:13 +0000

Wow, that sounds like a great project.

The bootloader repo is here :

You're certainly free to add a MM based board to the supported build targets if you want. Note that you need a non-free version of the XC32 compiler to build the bootloaders.

We are planning on adding MM support to the chipKIT project eventually - right now it's not the highest priority, so it's not getting any developer time. But I too have a future custom board that I want to design that would use an MM and be programmed from Arduino IDE.



Tue, 22 Nov 2016 17:36:39 +0000

Hmm, that is what I thought I heard about the bootloaders. Is there a particular reason for that or would it be possible to port them to gcc/newlib?


Tue, 22 Nov 2016 21:44:45 +0000

I believe that the bootloder can be compiled with the chipkit compiler - i think Majenko did this awhile back.

I'm not sure if he needed to make any changes in order to do so.



Wed, 23 Nov 2016 09:48:28 +0000

IIRC I had some issues with stability when doing that - not sure why or when, but I didn't follow it up - just switched to XC32.