Questions about PIC32MM + CP2014 USB serial project

Talk about anything you want!
Post Reply
gh0stwriter
Posts: 2
Joined: Mon Nov 21, 2016 9:45 pm

Questions about PIC32MM + CP2014 USB serial project

Post by gh0stwriter » Mon Nov 21, 2016 10:40 pm

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!
Attachments
pic32progport.PNG
pic32 programming port
pic32progport.PNG (9.49 KiB) Viewed 524 times
pic32voltagedetect.PNG
pic32 high voltage bus detection
pic32voltagedetect.PNG (22.57 KiB) Viewed 524 times
pic32usbserial.PNG
schematic of CP2104 circuit
pic32usbserial.PNG (22.38 KiB) Viewed 524 times

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Questions about PIC32MM + CP2014 USB serial project

Post by EmbeddedMan » Tue Nov 22, 2016 5:05 pm

Wow, that sounds like a great project.

The bootloader repo is here : https://github.com/chipKIT32/PIC32-avrdude-bootloader

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.

*Brian

gh0stwriter
Posts: 2
Joined: Mon Nov 21, 2016 9:45 pm

Re: Questions about PIC32MM + CP2014 USB serial project

Post by gh0stwriter » Tue Nov 22, 2016 6:36 pm

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?

EmbeddedMan
Posts: 597
Joined: Tue May 24, 2011 9:24 pm
Location: Minneapolis, MN
Contact:

Re: Questions about PIC32MM + CP2014 USB serial project

Post by EmbeddedMan » Tue Nov 22, 2016 10:44 pm

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.

*Brian

User avatar
majenko
Site Admin
Posts: 2164
Joined: Wed Nov 09, 2011 7:51 pm
Location: UK
Contact:

Re: Questions about PIC32MM + CP2014 USB serial project

Post by majenko » Wed Nov 23, 2016 10:48 am

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.
Why not visit my shop? http://majenko.co.uk/catalog
Universal IDE: http://uecide.org
"I was trying to find out if it was possible to only eat one Jaffa Cake. I had to abandon the experiment because I ran out of Jaffa Cakes".

Post Reply