chipKIT® Development Platform

Inspired by Arduino™

Some notes to TCHIP-USB-MX250F128B

Created Fri, 05 Dec 2014 09:34:47 +0000 by madias


madias

Fri, 05 Dec 2014 09:34:47 +0000

Hello, this topic belongs to all user of the TCHIP-USB-MX250F128B (the version with the preprogrammed bootloader direct from microchip). It was my first "chipkit" device and I got soon in troubles, so maybe this thread will help others!

The first thing is, that the preprogrammed MX250 lacks on documentation. There is no info about the programmed bootloader. You are linked to http://chipkit.net/diy-chipkit-board/ to build your first breadboard device. This manual works fine, until you use (D)SPI, SD-card library and so on. In the manual you get the advice to choose "fubarino mini" as device, but the "real" fubarino mini is shipped with the PIC32MX250F128D-50I/ML 44-pin MCU. So the pins cannotmatch 100%. So my strongly recommendation is to grab a pickit3 (I use a cheap china clone from aliexpress for about 13 Euros)

So I wrote a little "step by step" instruction note for installing the DP32 bootloader:

  1. download the chipKIT-DP32.hex from: [url]https://github.com/chipKIT32/PIC32-avrdude-bootloader/tree/master/BootloadersCurrent-hex[/url]
  2. download MPLAB X from [url]http://www.microchip.com/pagehandler/en-us/family/mplabx/[/url]
  3. connect the pickit3 line as following: WARNING! disconnect all external power sources (like usb) from the pic32! pickit3 <----> pic32mx250 pin 1 <----> pin 1 (reset) pin 2 <----> VDD (+3.3V) pin 3 <----> ground (ground) pin 4 <----> pin 4 (data) pin 5 <----> pin 5 (data)
  4. after installation you only need the mplab_ipe for uploading the hex file, so start it up while the pickit3 is connected!
  5. you must set up the power for the pic32: go to "settings" -> "advanced mode" and enter the nasty password now click "Power", and active the checkbox "Power target circuit from tool"
  6. go back and choose as target "PIC32MX250F128B"
  7. at the "source" entry click "browse" and choose the downloaded chipKIT-DP32.hex
  8. click "program" - after a few seconds you should be done!
  9. disconnect the pickit3 and connect the pic32 to the USB circuit, the LED on RB3 should blink. For your convenience I've done a little pinout sheet: [attachment=0]mx250-pinoutV2.png[/attachment]

GrahamM242

Fri, 05 Dec 2014 10:37:40 +0000

I wonder if the sketch that's located in the thread at chipKIT bootloader update sketch could be used to update the bootloader without having to use a pickit3 or similar?

Potentially that would be more useful.


madias

Fri, 05 Dec 2014 10:50:35 +0000

I looked at the thread for short, but cannot open the zip file. It seems that all "old" attachments are corrupt.


majenko

Fri, 05 Dec 2014 11:03:05 +0000

I have raised the attachment issue with the rest of the guys and gals. My guess is that something went awry during the migration to GoDaddy a while back, and I'm hoping someone still has the old backup from before that move.


djgardn2

Fri, 05 Dec 2014 19:19:24 +0000

Nice pinout diagram and step by step tutorial, thanks.

I wonder if you chose the "chipKIT Pi" as the device instead of the "fubarino mini" if that would have avoided needing the PICkit 3. I believe I did that when I first ordered and tested the TCHIP-USB-MX250F128B, although I did change the bootloader shortly after so I can't retest to verify this.


madias

Sat, 06 Dec 2014 08:27:28 +0000

I didn't ever selected the fubarino mini, but the "DP32", because it is has the same PIC32. I've about ten USB-PIC32MX250 lying around..so if I have time, I will test it. Another point buying a pic-programmer is, when you are going deep into programming, your chance to brick the bootloader is high. I bricked my test-chip about 2-3 times, so I've to "reanimate" it again with burning a new bootloader. I think the TCHIP-USB-MX250F128B is a little sham (is "sham" the english word for the german word "Mogelpackung"?). Nice for blinking some LED's but in the end you'll need a programmer for further things.


GastonLagaffe

Mon, 08 Dec 2014 10:39:23 +0000

Salut, I did the same as you described in the steps - thanks for the documentation. I changed the UTFT library a bit and am able to sue a SPI serial TFT. I also managed to run the adafruit code on a I2C 8x8 matrix as well as driving a SSD1306 OLED. Using the PICxel library I am able to drive neopixel strips from adafruit. I changed the library in a way that the original demo code works with the chipKit library.

I took the breadboard design and created my own humble PCB (see attached)

I am new to ChipKit and I do not know yet how to correctly feedback the code I modify and create but will share my work and designs.

Ciao, Mathias


madias

Mon, 08 Dec 2014 18:42:21 +0000

Nice work Gaston! I have one question about your design: I only see a diode from the usb connector, but no one from the DC-Jack. Shouldn't it be better plug diodes from each power source? So it doesn't matter if both power sources are connected and you get a reverse polarity protection for you DC-plug.

About the UTFT-lib: I also did a little modification for working it with the PIC32MX250. Only SPI mode is currently working (because I have no 8-bit parallel TFT at home), so my library is attached, with the bonus for ILI9341 support. (for all those fantastic 5 Euro 320x240 2.4" TFT´s from ebay/aliexpress).

Another point could should be said, that I only working with UECIDE as IDE, not MPIDE.


GastonLagaffe

Tue, 09 Dec 2014 14:38:06 +0000

Salut Madias,

looks like we did the same changes to UTFT ... ;) I will look at the 8-bit interface as soon as I find the time, 16-bit will be impossible with the 28-pin chip.

I added the z-diode in the DC-jack side as you recommended - good idea and there was space left on the PCB.

I use UECIDE as well and like it a lot. I even move my Arduino Code over to use only one IDE to conquer them all. My goal is to have the code to compile for both platforms.

Ciao, Mathias


madias

Wed, 10 Dec 2014 10:30:37 +0000

Dear Gaston, are you going to produce the cicuit boards yourself? I like your compact layout :) But I don't understand, why you won't take the 32MX250F128D-IPT for some extra pins (33 instead of 19)? So it would give sense adapting the UTFT for 8-bit support (on F128D you'll have about 10 RCx pins extra in series for example, the ideal "TFT-Port"). Using TQFB instead of PDIP will also save space on your PCB for some extra gadgets :). For myself I think about creating a 5x5 (maybe too small) or 10x10 board and try out http://dirtypcbs.com/ (I didn't done gerber layouts before, maybe a good practise for beginning)

PS: (#intern_german): Nette Seite, wenn das deine ist! Jetzt verstehe ich auch, warum du keine SMD Bauteile verwendend willst "so dass das Board auch von Kindern gelötet werden kann" -> werd mal meine 2 jährige Tochter das probieren lassen ;) http://playground.boxtec.ch/doku.php/chipkit/start


majenko

Wed, 10 Dec 2014 13:01:32 +0000

Oh wow :) Through hole always looks so chunky to me these days :P

Are you thinking of selling this in kit form? If so then fully through hole makes perfect sense. Or is it just that you haven't explored the surface mount route yet? If the latter, I can fully recommend it. I find surface mount so much easier than through hole these days, both from a design perspective, and a building perspective. No pesky holes to get in the way of your layout. Everything so much smaller and taking up so much less room. No feeding leads through holes, flipping it over, holding it in place with one finger underneath, soldering the leads by hand, burning your finger in the process ;)


madias

Wed, 10 Dec 2014 15:33:09 +0000

I think it's laughing time for you, majenko! I added photos my last (through hole) project (4-voice DDS-synth with analogue filters) as attachment, and YES, I can agree with your statement, COMPLETELY (This is only one of six circuit boards!!) BUT: I can sell the synth as "hand wiredanalogue synth" on ebay ;)


majenko

Wed, 10 Dec 2014 15:43:00 +0000

Nice!

Still, cheating with a pair of Pro Minis :P You should have a Z80 and some AY-3-8912's in there instead :) Or maybe a 6502 and some SID chips if you're that way inclined :twisted:


GastonLagaffe

Wed, 10 Dec 2014 15:45:22 +0000

Salut,

as you spotted correctly, this is going to be produced for the group of electronic enthusiasts in Basel, Switzerland. I myself have no commercial interest and Boxtec usually sells the kits at small margin. The reason behind selecting the PTH chip is that children should be able to solder them. If you have ever seen the eyes of a child soldering a board and lighting up an LED ... I have the TQFP version in the pipeline (testboard already at OSH) but I do not see the benefit over the ChipKit Uno32.

Ciao, Mathias PS: Die Playground-Seite ist korrekt


madias

Wed, 10 Dec 2014 15:55:42 +0000

thoose chips are much too expensive in this days ;) Seriously: the sound of the mini (better the TLC7528) is very clean. I use 8-bit wavetables, but the whole filtering and VCA is done with the V2164, so the 8-bit's are enough for that. But the real sick thing is, that the the whole synth is powered/connected via a tiva-c launchpad, which can have done everything alone(nearly: I use all in all 4 of these TLC7528 parallel DAC's, not even enough for the massive pins of the tiva). So I use 4 minis (sound engine), one tiva (master controller) and one Atmega328 (key and poti controller). This give not sense at all, I know, but it was my learning project how to deal with communication between (different) microcontrollers and I've realized, that I would NEVER do such a big project with through hole again :)


madias

Wed, 10 Dec 2014 16:15:52 +0000

Gaston, I know what you mean with the child eyes: I often do tinker around with my daughter, and yes, she loves all thoose blinking stuff (4x 8x8 dot matrix!) and like it to operate the skrewdriver ;) I've found a really good tutorial for all people they are new to PIC32 and will learn more about it, maybe you'll post this link on your page, it was really helpful to me. http://umassamherstm5.org/tech-tutorials/pic32-tutorials/pic32mx220-tutorials

PS: the benefit over the Pic32Uno? Not that idiotic pin pitch as the arduinos...and maybe with both: female AND male pins (like the TI tiva C)?