chipKIT® Development Platform

Inspired by Arduino™

Making your own custom board

Created Sun, 04 May 2014 06:47:17 +0000 by Ian Billing


Ian Billing

Sun, 04 May 2014 06:47:17 +0000

I am interested to hear from the group any experiences with making your own custom boards with the PIC32 and what the challenges / successes have been.

I have built my own board from the Max32 circuit diagrams and plan to load the bootloader via MPLABX and then carry on with my sketch in MPIDE as before with the Max32. This was prompted after I had so many peripherals & shields hanging off the Max32 that I thought it an interesting challenge to put everything I need onto one board. I was also running into problems measuring temperatures via thermocouples in an industrial (ie noisy) environment and wanted to split the analog ground from the digital ground and have a reliable reference voltage for the A/D.

Any suggestions or "heads ups" will be appreciated.

My board consists of: PIC32 DS1307 RTC (with 2302 battery backup) AD7416 I2C thermsitor WiFi chip (SPI) SD card (SPI) FTDI 232 (for mpide) USB PHY ethernet (LAN8720) with RJ45 External WDT chip On board spdt relay SPI to I/O connector RS458 to I/O connector (viaMAX485) RS232 to DB9 I/O connector (via MAX232) CAN to I/O connector "One wire" to I/O connector RJ 11 for ICSP access (pickit 3) Header for 16x2 LCD (I2C) 12v bus 5v bus 3.3v bus 256K EEPROM (I2C) Digital inputs Digital Outputs Analog inputs Opto isolated digital inputs


Jacob Christ

Sun, 04 May 2014 16:38:21 +0000

When working on the Quick240 (Quick240.com) we had a lot of trouble getting Ethernet to work. I practically had to re-roll the Ethernet driver before I figured out what had happened. The bootloader (in the repos) at the time had a config bit turned off that prevented Ethernet from working. I think it has been fixed in the repo's but I haven't compiled a new bootloader from the repo in some time (but other have).

We also tried (but not real hard) to change the abstracted pin numbers but ran into problems so we ended up leaving them the same on the Max32.

You can see the result of this here: https://docs.google.com/spreadsheet/pub?key=0ApaL-0qLgNhgdEp6Y19ZeVQ2M0pSdGFhbTB0WDJaTUE&output=html

There are some weird hard coded per board issues in some Digilent libraries that we had to mod. As a result someone couldn't use our boards without doing this mod as well. The whole install process is quite wonky and a bit troubling. I also feel at a loss to fix the issue because the problems are in Digilent libraries that are not in public repositories.

If you have any other questions as you progress let me know.

Jacob


Ian Billing

Mon, 05 May 2014 05:18:04 +0000

Thanks Jacob

I see that this can be quite daunting! The link to the bootloaders in the repos is very useful and I will have to look at maybe compiling a new one from there - I see that the official one listed on Digilent is about 3 years old.

First step, I suppose, is to take a leap of faith and go with the official bootloader first and then start fixing problems as they come up. I plan to do this later in the week and will post my results.

Thanks.


Jacob Christ

Mon, 05 May 2014 05:28:15 +0000

The Max32 bootloader I'd here:

https://github.com/chipKIT32/PIC32-avrdude-bootloader

I think another issue that caused our bootloader issue is that we use the USB bootloadet, which when we started was only being used on boards that didn't have Ethernet hardware.

Jacob


Ian Billing

Mon, 05 May 2014 14:21:39 +0000

I have managed a bit of success in that I received my custom board back from the factory and managed to load the bootloader via MPLABX /pickit3 and my code is running!

I still have to go through all of the individual modules and check the functionality but it is a great relief that at least I can get the bootloader onto it and start loading my sketches.

Using the Digilent official published bootloader gave the problem of hanging on the "Uploading..." prompt.

Thanks Jacob - your link to the updated bootloaders solved that problem.