• Please review our updated Terms and Rules here

AT to XT Keyboard Converter

I just picked up a programmer on feebay for the deed. I now have the same one that chuck has, and it listed the PIC that we're using in the item description, so I'm confident this will work. I should have one anyway, these PICs seem to be just too cool not to want to play with in the future...
 
If that fails, that will derail this project for a little while, until I get my hands on a programmer, or we plead with chuck to spend an evening at his, doing up all 25 parts for us. Stay tuned.

It doesn't take long to do one of the chips (only a 1K program memory) so if push comes to shove, I can do it.

If you're handy, you can also wire up a JDM programmer from parts in your hellbox. It runs off a standard (not USB) serial port and is self-powered.

If you've got a Willem programmer, here are instructions for burning a 12F629 PIC.
 
hi everyone,

sorry it's taken me so long to start on this project; xtide absolutely killed my free time.

Anyway, I got a JDM programmer, and IC-prog, and I can't get the PIC to be programmed. Here's what happens:

1) hardware is all set up (used the NT driver for comport access), pic is in the correct location in the zif socket.
2) I load the hex file, see the data, the oscillator dropdown changes to "intOSC GP4"
3) I erase the chip, says it did the job.
4) hit program all, and it tells me "no oscillator value found" use the default from file (3fff) instead? [yes] [no] [cancel]
i have no idea what to do there, and it doesn't seem to matter anyway.
5) it programs the part, does the verify, and the verify fails at address 0000.

are there other settings I need to tweak? I've got a 12f629 in there.
unfortunately, it's the only one I have, so i can't verify if the chip just happens to be DOA.

Grrrr.
edit: my pic must be shot. winPICPgm can't autodetect the part itself. It can see the programmer, but not the device.
Looks like another order from digikey (and $9 shipping charge) to send a couple PICs is in store for me.

Here's the first installment of the firmware, complete with LED control.

This uses a single PIC 16F629 8-pin microcontroller, one 47 uF decoupling capacitor, two 4.7K pullup resistors and one 1N4148 diode. If you install this inside of a keyboard, you could probably get rid of the decoupling capacitor--my installation is in the middle of a long cable, so better to be safe than sorry. I recommend socketing the PIC so it can be removed for reprogramming.

My own setup is a simple "enchanced" JDM parallel port programmer, although there are a lot of other possible ways to get the job done. (Just search for "PIC programmer" on eBay.)

I use IC-Prog under Windows to do the deed; it's the only JDM programming software I've found that will reliably handle the configuration bits.

To compile, I use GPASM, as it's small and straightforward, rather than the bloated MPLAB PIC IDE, although this code also assembles just fine under MPASM.

That's about all I can think of at the moment.

Let me know what y'all think...
 
Last edited:
Hargle, the various programming packages that work with the JDM are all a little different. Depending on your system, some work, some don't.

As well as the latest version of IC Prog, you might want to try WinPIC or PonyProg.

Generally speaking, a slower machine is better (I use a P3 533MHz running Win2K for programming).

I've got a few 12F629s here (I order them by the dozen). If you want, I can drop a couple (one programmed, one not) in an envelope for you.

It's not a good idea to overwrite the calibration word. The PIC tweaks its internal RC oscillator with that value (the word is nothing more than a RETI instruction) to get you to a clock that's within 1% of nominal. The word is set at the factory.
 
winpic got verify errors too. ponyprog doesn't seem to support the 12f629's.

I am running this on a 3GHz dell machine. I tried slowing down the interface inside of picpgm, but that didn't help any. I've got a 1Ghz machine I can try it out on later on. I'm back onto xtide for the moment.

standby on mailing stuff to me for now.
 
For whatever it's worth, I'm using IC-Prog 1.06B on a Compaq P3 (Slot 1, 533MHz) Deskpro running Win2K. My device setup is COM2:, with "Windows API" specified rather than "Direct I/O", so I don't need any other drivers.

I find that it's useful to keep a couple of old machines around to run some of the older freeware, as it tends not to get updated very often. I've had exactly no luck with PICpgm, but that's another one you might try--on my machine, it sees the JDM just fine, but not the PIC installed in it.

(The USB floppy card uses an ATMega with ISP programming, which makes life a lot easier, but the little uCs sometimes test your patience).
 
my 1Ghz machine was unable to program the PIC as well. It just can't ID the part. So, I guess:
1) the part itself is fried.
2) my programmer is bad
3) it's an issue with XP (using it on both machines)

I rule out #3, since the software is happily detecting the programmer itself.
To kill of #1, (and #2 I guess) I've ordered a batch of 10 PICs which should be here in a couple days.

so, standby I guess.

PM to chuck- I really should have done this a long time ago, but I'm going to mail you a PCB. Hopefully you have the other parts to mount onto it, but you might be the fastest way to get this little project off the ground if I'm incapable of programming the PICs. You will likely have to let us know if the PCB is a success.
 
Hi Hargle! I can help test if you'd like. My programmer can program PIC 12F629's since Chuck and I used them on a previous project. I'll be happy to program a batch if it will help. Please let me know what I can do to help out.

Thanks and have a nice day!

Andrew Lynch
 
Got 10 more PICs in yesterday. tried one other PIC, but got the same results. I absolutely cannot program 'em with my crappy programmer. Tried a couple different programs, none of them were able to even ID the parts, even though they detect the programmer itself just fine.

I will give it one last try on another machine, but I am starting to think that the programmer itself is hosed.

I sent off a PCB to chuck for building up and testing. If it just so happens that the hardware is good and the PCB is ok, I will likely try and get andrew or chuck to program the PICs (since there are only 25 total) and we can get this project moving forward.
 
I sent off a PCB to chuck for building up and testing. If it just so happens that the hardware is good and the PCB is ok, I will likely try and get andrew or chuck to program the PICs (since there are only 25 total) and we can get this project moving forward.

Hi Hargle, I got the card in today's mail and will get it stuffed this weekend (the wife's out of town) to make sure it operates and get back to the list.

It could well be that your programmer's hosed. You may want to check it against some of the build-it-yourself "JDM programmer" schematics on the web. Fortunately, there's not much on one of these--I bought mine mostly because it was cheap and had a ZIF socket.
 
I had a little spare time today, so I put the board together. It took about 15 minutes, and that included flashing the uC. I didn't have the exact 5-pin DIN connector that Andrew used, but it was close enough. I didn't bother with the incoming AT-sized connector, as I wanted to try it out with a PS/2 keyboard.

Powered it up, hooked it to an XT and a Model M keyboard and it worked right off the bat!

Good job, Andrew and Hargle!

attachment.php
 

Attachments

  • keycvt.jpg
    keycvt.jpg
    43.5 KB · Views: 3
OK, back on this as of this week.
I'll be picking up the parts for the remaining boards and then I'll ship 25 PICs to some unlucky sap who will need to program 'em up and mail them back to me, then I can start taking orders for them.

(in the meantime, I will also try and get one last attempt at programming the 11 of them them I have)

again, really sorry this has all taken so much time for me to get rolling. I know now that multiple projects at the same time is perhaps not the best method to getting anything accomplished.

Super happy that they work, and not surprised in the slightest that they do. ;)

stay tuned. digikey is about to make some money.
 
Hi Hargle! I am always surprised and happy when projects work! :)

Thanks and have a nice day!

Andrew Lynch
 
Just curious--has anyone else tried this thing except for me?

I'll be happy to program 25 of the things, if you want.

In retrospect, I probably should have used an Atmel ATTiny AVR, but the PIC had a 16-bit timer and came in an 8-pin package. The ATTiny24 has similar capabilities, but in a 14 pin DIP. AVRs are in-circuit programmable; small PICs aren't.
 
Just curious--has anyone else tried this thing except for me?

nope. I haven't shipped any other PCBs to anyone else, and mine is sitting here unprogrammed, but ready to roll. I even was rude enough to not ship one to andrew yet!

I'll be happy to program 25 of the things, if you want.
ha, sucker. ;)
You've just signed up for the job.
When I get all 25 parts (actually 24 since you have one) I will drop 'em in the mail for you and you can ship them back to me when complete. Then we ship kits from there.
 
Is there enough of a benefit to in-circuit programming to change the design?

Good question. :)

Both approaches require a programmer; but the AVR programmer is a dirt-simple design that runs off the parallel port. And you don't have to use a socket.

On the other hand, the AVR takes up more real estate and would require at least a 6-pin programming header added, which might not make it possible to do a single-sided PCB.

Bottom line--I don't know. :tellme:
 
So by in-circuit programming you don't mean programmable via the keyboard plug? If you could update the chip via the the DIN connectors then it may be worth investigating.

But it sounds like it is not really be worth it since you would need to add another side to the circuit and probably a DB9 header, and this would add a fair amount to the cost.

Is my reasoning here correct?
 
But it sounds like it is not really be worth it since you would need to add another side to the circuit and probably a DB9 header, and this would add a fair amount to the cost.

Just a simple 6 pin header works well; cost is negligible. But I still don't know if it would be worth it.
 
Back
Top