Search This Blog

Monday, April 18, 2011

Bootloader - Outdated... ICSP!

    Okay, I'm out of date.  I'm 40, I accept that. I went to program my new Pic 18F2455 with my trusty, updated circa 1996 PicStart Plus programmer.  It couldn't handle the new chip.  I checked my Linux software (picp), my usual suspect, but it supports the new chips.  I checked that I had the updated chip and firmware in my programmer.  No dice.  I went and ordered an older but Linux supported programmer for around $30 from Mouser.com.  I continued work on my Java bootloader for the new chip.  Meanwhile, I looked for things I did wrong with old programmer.  I didn't find anything.
    I needed to keep going, so I pulled out a working chip: the Pic 16F876a.  It wouldn't load from my bootloader.  WTF?  I have upgraded my OS twice since the last time I bootloaded.   I am now on Python version 2.7.  Somehow, uspp will now not work.  I made sure my code was good, my connection still worked, etc.  It boiled down to the new Python with uspp.  So I began the laborious process of porting my Python bootloader code over to my in progress Java bootloader.
    Then my new programmer arrived.  It is a PicKit 2.  This thing programs chips via ICSP.  It hooks to the PC via USB.   Cool,  No more USB to Serial nonsense.  However, it did not come with any kind of cable to connect to the chips!  It is very small.  Here is a pic:

    It's really small!  I needed a cable to connect it, so I grabbed an old EIDE cable from an old computer.  I used an Exacto knife to slice off 6 wires at about 6 inches of length.  I peeled back each wire at both ends about a half an inch.. I sliced into each wire carefully on each side to expose the wire ( about a quarter of an inch ).  On each end, I soldered a 6 pin male, swiss pin header.  I wrapped each pin with electrical tape. I can hear EEs everywhere shouting at me, but it works.  I wrapped each header with more electrical tape.  here is the finished result.  It will do for now:

    What this 'lil guy made me realize is that I don't need my bootloader code at all!  I can just adapt my circuit to accept an ICSP connection.  It is so fast and easy.  I have a new design for my 28 pin chip board all ready.  I just need some silly parts from Sparkfun.  Here is the new design:

    That's a bad picture, but it does show some changes I've made.  I put the A pins back on the other side.  That way, they will be closer to the sensors.  I've added an ICSP header.  I'll be able to program the chip that way instead of via a bootloader.  the ICSP is ***way*** faster.

    That's all for now.  More when the parts arrive and I get them together.  Ciao!

No comments:

Post a Comment