Extending the Kanda Handheld PIC Programmer



QUICK REVIEW:
I recently picked up this Kanda Handheld PIC Programmer and really love it. My apps are 99% automotive based so I need a mobile programmer, but dragging a laptop, programmer, and bunch of cables, etc gets a bit messy. This programmer is a great solution to that problem. You can read all the facts, specs, supported chips, etc. on their website, so I'll only present my opinions here.

For the record, I am not affiliated with Kanda, and "Kanda", and probably "HHP", etc are registered trademarks, service marks or similar of Embedded Results Limited in the U.K.

PROS: Absolutely serves its intended function, and at a very reasonable price. I'll actually pick up another one or two for other uses and as a backup (which I seem to do for anything that becomes a regular part of my work cycle nowadays). The simplicity (one-button) of programming the target has me considering it as a production programmer.

ISSUES/NIT-PICKS:
The only issues I have with this are that the cable that connects the programmer to the parallel-port dongle (also used for programmer to target breakout board) is wired in a non-standard way -- not being pin-1 to pin-1 is confusing. Also, some useful info (such as flashing-LED error-codes and flying-lead pinout could've been printed on the enclosure, but it was easy enough for me to put that on myself. Finally, I thought the button on the front could've been more "clicky", meaning it could have a more tactile feel. But that is really nit-picking now.

NEXT LEVEL:
Here's the purpose of this writeup -- I do have one major nice-to-have that I found a way to implement and which I will explain here. That is the ability to store multiple programs simultaneously on the programmer so that I don't have to keep coming back to my PC to download/try a different version each time. I envisioned some type of removeable storage (SD card, CompactFlash card, etc).

So I poked around inside the programmer to see what's under the hood. At first glance I was impressed with how well constructed it is. It just looks robust, which is my concern with any mobile-use product. What I found circuitry-wise, other than an Atmel microcontroller and other power components etc, was an Atmel AT45DB021 Dataflash chip (in 8-SOIC package). A quick check of the datasheet verified that this is just pure storage. A quick check with Kanda's support (who very willingly helped) got me some important info...
(1) The downloaded hex program *is* stored on that chip, but...
(2) Configuration bytes, user ID locations, and programmer settings are stored elsewhere.

This means that I *can* put hex programs on a separate DataFlash chips, and plug one into the programmer circuit at any time, but the config setting needs to be the same for all programs. Also, Kanda's support said that "if PIC Data EEPROM is used in one program, then it would always have to be included as use of Data EEPROM alters code start address.". I am still trying to find out the full implications of this, but for now it is not a problem as 95% of my apps use the PIC16F913 with the same circuit, and same wrapper code and settings.

Now, converting the Atmel DataFlash signals to the protocol of any removeable storage could take some work/time. I could just create my own removeable storage by making small PCB's with card-edge connectors and mounting one of these DataFlash chips on each one. But then still, mounting a connector for this removeable card system could take some work etc. Also, carrying around these small cards could be a pain, and I'd have to take ESD precautions, etc. Instead, I figured I could piggyback a few of these chips together and switching the chip-select lines such that only one is active at any time. All the chips would be inside the programmer, so this system would have a finite limit on how many programs I could store, but I figured if I got 6-8 programs it would be ample.

The photo writeup that follows explains how I implemented this idea successfully. Click on the images for a larger view.



The back of the programmer, with some useful info I previously stuck on.
Inside, the chip on the top center (8-pin SOIC) is the Atmel dataflash chip (AT45DB021) that holds the program data.
Determine space available, and position all mounting holes so that they align with existing mount points. The "stepped" line/edge is done like that to clear the tall capacitors.
Since there are only 2 screw-mount positions available, I placed the DIP switches between the 2 screws for maximum rigidity when any switch is operated. Also, I did not want to use the top area for the switches as the enclosure has a securing notch there so I did not want to cut holes (for the DIP switches) in the back of the case near there. The maxium number of switch positions I could fit was 16 (2 @ 8-position switches). I also thought of using dual-row 0.1" male headers with a single jumper (shorting block), but the thought of using a non-locking shorting block for a mobile app didn't exactly appeal to me.
Now I had to see if I could fit 16 of the Atmel Dataflash chips in the remaining space, along with 16 pull-up resistors (I used 0805). I was able to squeeze them in, and routed the board.

At this point, I printed out the layout actual-size, cut it to shape and verified that it fits in the enclosure and clears the capacitors, etc.
Here is the schematic for the complete 16-chip setup.

Note to self: Place Eagle .sch and .brd files here for anyone else that wants them.
Here, the PCB was fabricated and carefully cut to size. I added this to an existing PCB order, so cost was minimal.
The PCB was trial-fitted in the case, making sure screw holes lined up.
Next thing is to remove the existing Dataflash chip. I stuck a pair of curved tweezers under one side of the chip, and quickly heated all 4 pins (with a soldering iron) on that side while gently lifting the pins. This was relatively easy as there is a natural "pivot" on the curve of the tweezers. I avoided overheating as I wanted to keep the original chip intact, just in case I got some surprise later (such as some pre-configured info stored on that chip. ...Just in case.)
This is a clearer view of one side lifted.
I then lifted the other 4 pins.
The rest was simple -- just remove the solder bridges with some wick and the chip comes right off. I used some wick and then flux remover to clean up that area of the board.
I stored the original chip. Just in case.
I then cut some 8-conductor ribbon cable and alternately staggered the ends after some careful measurements of the width of the original chip and connector area on my PCB.
Close up of one end of the cable.
With CAREFUL attention to wire orientation/alignment, I soldered the wires onto the pads of the original chip and the connector holes on my PCB. I did not use a connector as I was pretty sure I'd have no room for one.
I added some foam blocks for now to prevent any shorts.
Side view of the sandwich.
Next, I soldered on one chip only (with no pullup resistor) to verify it works as it did before. After this, I added the pullup resistor for that chip and again verified it worked. I am not aware of what circuitry this chip was connected to on the programmer, but I figured 470k would be all I need for a Chip-Select pullup (to deactivate it). After this, I proceeded to solder on a couple more chips and pullups and started running tests of selecting different chips. So far, all works well. Finally I decided to evaluate different DIP switches for height.
Another view of the DIP-switch height comparison. I decided against the taller unit due to it's rockers being too easy to accidentally knock out of position.
Now, I completely assembled half of the board. I only want 8 positions for now, but will add the other 8 later once I have had some time to properly test that all works.
Problem: The only thing that I can't finish yet is formally mounting my PCB onto the existing screw-holes in the enclosure, because I can't find screws with the same thread diameter and pitch (but 1/4" to 5-16" longer). I haven't been able to match it with anything metric, and it does not seem to be 2-56 thread, yet it's definitely much smaller than #4 screw-size. I was thinking I'd just enlarge the holes in the mounting bosses in the enclosure for #4 screws, but there is apparently not enough material on the bosses. So for now, I'm using double-sided tape (the same foam blocks, but I stuck the underside as well now. If I don't find the correct screw, I'll drill all the way through the front on the enclosure and use #2 or #4 machine screws with nuts.
This photo shows the original screw on the left, a 4-40 in the middle and a M-F standoff that came from a DB25 connector on a PC. I have to experiment with using this last one still. The two spacers on the top (1/4") are what I used between the two PC boards.
Now, I made the rectangular hole in the back of the enclosure. Drill a few holes, connect those with an X-acto or box knife, whittle it open with the knife then file the edges smooth. I'm thinking that I'll change the DIP switches to something taller but with sunk-in slide switches -- similar to what I'm using now, but just taller so it comes up a bit more flush with the back of the enclosure.
I moved my info stickers to the front, so I had space on the back for labelling the different versions of code currently stored in the programmer.
Field testing. Works like a charm! With a couple caveats of making sure that the config settings are the same across programs and making sure only one Dataflash chip is selected at any time, it will make life sooo much easier for me now.

BTW, so far with 8 positions, I have only about US$21 into this mod. The other 8 positions will add approx. US$14 more.




Back to electronic projects menu...