Friday, June 24, 2005

 

more on pics

I purchased a pic programmer recently, its called the "ID MULTI" from interesting devices. This little programmer has enabled me to delve into the world of pic programming, something I wish I had tried a long time ago!

It can program a small range of popular PIC chips, and I have had success with some chips that were not on the "officially" supported list.

Dont really know where to start with the whole pic thing, there are plenty of sites around that have excellent tutorials on the subject, I would advise looking on google to find some.

They can be programmed in assembler, or you can get a C compiler (there are even free ones out there that work a treat, but are limited to a small range of chips they will work with).

I had to stop learning for a while after a power surge blew both my fruit machine AND my pic programmer up, the fruit machine just blew a electronic fuse, which reset itself later on, but the programmer was a different matter.

It didnt fail in a obvious way, at first I thought the chip I was trying to program was faulty, as it programmed but failed the verification. After trying several chips, I discovered that it was either the lead, the parallel port on my pc or the programmer.

A quick check of the lead ruled that out, and trying it on another pc ruled out the problem of a bust parallel port.... So guessing it must be the programmer I tried replacing some of the parts on it. I started with the voltage regulator, the 5v one, as I had a load of them in my desk drawer.

No joy... So I desoldered the caps, and checked them, seemed fine, but to be on the safe side I put some new ones in. No joy.........

The only IC on board is a old TTL 7407 (a few open collector buffers), I could not find any, not even on ebay, so I had to hunt around in the loft for AGES to find a old PC motherboard with one on.

I HATE DESOLDERING MOTHERBOARDS, especially the type that seem darn impossible to desolder, I ended up snapping the ground pin of the chip whilst removing it, as that pin just refused to desolder..... Anyway, I tried the chip in the socket (shoving a bit of lead cut of a resistor into the ground pins socket and pushing it against the tiny bit exposed metal that was once the ground pin...)

Powered it up, and thankfully it worked first time... Not exactly a great fix, but it was a relief to get it working, and a nice feeling at actually having fixed something for once :)

Sadly the board is a little worse for wear, when I was desoldering the caps, the solder sucker took of the pad trace from the pcb (unusal as that normally does not happen to me when I desolder, guess this "quality" pcb is not really that good quality, considering how easy the thing drops to bits during repair....)

But I dont care, it WORKS and I can get back to learning about the art of pic programming. They have a lot of pitfalls, many little things you need to learn to get anything working, so I would suggest starting with something simple. Find a tutorial to turn a led on and off, and follow it to the letter, then when that works you can add to it, try using each i/o pin in turn to turn the led on and off.

This way you will find out if all the inputs and output pins output the way you expect, some chips have pins that work in only certain ways, and you need to learn about this or you could be wasting a lot of time wondering why a complex program is not working.
Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?