Saturday, August 27, 2005

 

Oscilloscopes...

I have been after an oscilloscope for many years now, I even signed up on ebay years ago just to bid on one (I lost my original account, as I no longer have the email address I used back then, and cant remember the password!!).

Its taken many years, but I have finally managed to get not one, but THREE scopes. Will probably be forced by my other half to sell one or more on ebay, but hope to keep at least two of them :)

What is a scope? If you know, then you can skip this bit, and move on down to a interesting link further down, which describes a online virtual scope.

Electricity is invisible, so its very hard to see what is going on in a circuit. You cant see the flow of electricity like you can water, all you can do is measure it.
A normal meter can show you the voltage that is present at a certain point, but what if that voltage is rapidly changing? Most meters would just show an average reading.
You need to really SEE what the electricity is doing in order to really understand it, and improve your designing / fixing skills.

The scope allows just that, it draws the waveform of the electricity on screen,
and allows you to view it in a nice friendly manner.

There are many links on google and other search engines which show you more about scopes, but for newbies to electronics, and even people experienced the following link may be of interest.

http://www.virtual-oscilloscope.com/

Its a online scope, just like the real think, you can plug in the test leads, and see the wave form on screen. Even better, you can twiddle around with all the knobs and buttons to see what happens, all totally safe, no fear of electrocution or blowing up a real expensive scope. If you are considering a scope, or need to learn about them, I can recommend a visit to that site. Its based on a real scope, and just shows what you can do with macromedia.


Click Here to shop at eBay.co.uk


Back to the scopes I purchased on ebay, the first one was an absolute bargain, a advance instruments 0s2000r for the grand sum of 2.25 uk pounds!
The next one is a meguro mo-1253 40mhz scope, both work fine, but I dont have any service or operators manuals for them, so if anyone out there has a copy they could email me I would be over the moon!

Im awaiting arrival of the third, a philips scope, when that arrives I can update this blog, and maybe put some pics of them in.

Managed to pick up some nice leads on ebay cheaply also, cheap even considering I bought them from a USA seller, and Im in the UK. Delivery was very fast too,faster than some UK sellers to other UK sellers!

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.

Saturday, June 04, 2005

 

PIC's

I know the next post was supposed to be about eproms, but I have had a few cans,
and thought it would be more fun to post about pics for now.

PICS are great, they are the new 555 or 741, if you dont have a clue what I am on
about, dont worry, but if you get the gist - then learn more about PICS you will not regret it.

A PIC is basically a microprocessor, with in built ram, rom, i/o, and often more (ADC etc).

I recently started using these, and I am kicking myself I did not bite the bullet years ago! If you are know enough about electronics to interface basic ttl circuits, and can do a little C, or Basic, or Assembler then learn about PIC chips NOW!!!!

Will post more about eproms (honest :) ) later, and will cover more about pic's in the future, just felt the need for a rant :)

Friday, May 27, 2005

 

Eproms.....

What is an Eprom?

Computers, fruit machines, household appliances, in fact all sorts of electrical equipment these days use microprocessors to run. These processors need to be told what to do, and these instructions need to be stored somewhere permanent.

This is where the eprom comes in, it stands for
Eraseable Programable Read Only Memory

To keep it simple, its a memory chip, that you can erase, program, use.
You can then upgrade the program, by erasing it again and reprogramming it.

This makes them ideal for any device that needs updates from time to time.



Above is a picture of a eprom, notice the little window in the middle of it?
This is a quartz window, and if you shine Ultra Violet light through it for long enough, the contents of the eprom will be erased. Even sunlight contains enough UV to erase an eprom (but it could take days or weeks), so normally a small sticker is placed over the window to stop any light from entering and accidently erasing it.

Special devices called Eprom Erasers (original name eh) are available to erase eproms in a reasonable amount of time, normally the contain a UV lamp controlled by a timer which you can set between 0 and say 1 hour, depending on the eprom being erased.

Datasheets are availabe (free of charge) for eproms, which tell you all the info you need to know about the eprom in question, including how long you need for it to erase, how to program, etc.

If you want to learn more about how a eprom actually works, internally, then do a quick google search, there are plenty of links that explain the physics of it better than I ever could :)

How to program an eprom.

Well the easiest way is to buy an eprom programmer, there are countless available ranging from low end simple ones, to ones costing thousands that can program everything apart from the kitchen sink.

I recently purchased one on ebay, so I will give a quick run down of how I made a backup copy of the eprom in my fruit machine.

I chose the fruit machine as it is quite old now, and I could see a real result once I had burned the eprom, making it all the more worthwile.
Note the pictures in this post are not of the eprom I programmed, nor the card from the fruit machine. I could not be bothered to take the old machine to bits again, so I just used a card from another machine that was already sitting on my desk for the photos.

The Programmer.

The programmer I purchased on ebay, is a ART-EPP2 programmer.
It is discontinued now, but the manu still supports it enough to offer software downloads for it. I got hold of it cheap, but I did take a gamble as it was untested. Thankfully the gamble paid of, as it works fine!



As you can imagine, with an eprom having many tiny legs on it, they are quite fragile, so taking one in and out of a board over and over can weaken the legs, bend or even snap them.

Thats why this, and most other programmers have what is called a ZIF (Zero Insertion Force) socket. Thats the block at the end with the little lever, you lift the lever, and you can drop the eprom in, with no pressure needed, lower the lever and it gently clamps down on the legs making electrical contact with it. It literaly is what its called, a zero insertion force socket. They are a must, dont get a programmer without one, or your eproms wont last as long.

My first problem was finding a lead for the programmer, it communicates with the PC through the parallel port, normally used for older printers.

Luckily I had a old lead from a 2 way printer switch that fitted the bill perfectly,
if I did not have that lead, I would have either had to buy one, or make one up.

The lead itself is just a straight through (ie pin 1 to pin 1, 2 to 2 etc) 25 pin male to the 25pin parallel connector on the pc.

Once I had a lead sorted, I plugged the mains in (standard kettle / pc lead) and hoped for the best. The little red light came on, and no smoke came out, so it was looking good.

(Electronics components run on smoke, if you let the smoke out they wont work. Quote by some professor, cant remember his name, maybe someone out there can comment if they know)

I downloaded the software, which I found by doing a google search for ART-EPP2 and installed it.

I didnt bother trying this on XP, I decided to use win ME, at first, as this would be less likely to cause problems (XP tries to stop people accessing the hardware directly and can cause all sorts of grief with older software)

This is where things didnt look so good, it refused to autodetect the programmer.


To get round this, I had to shut down, and unplug the programmer for a little while,
this seemed to cure the problem, and it worked fine. Occasionally it screws up, but
unplugging the programmer for about 10 secs seems to solve any problem.

Once into the software, the first thing to do (after you have autodetected the programmer in use) is to get the eprom we want to read.

Here is a example of a program card from a fruit machine,



Taking the lid off will reveal the 4 eproms in their sockets (eproms are usually socketed, as they are meant to be removed for updates).
  • Remember doing anything like this will probably invalidate any warranty.
  • You do it at your own risk!



    Removing a eprom from its socket isnt too hard, but do it carefully or you will snap or bend the pins. Do one eprom at a time, dont take them all out at once, then realise you forgot which eprom went in which socket!

    To remove it, insert a small flat blade screwdriver under the eprom at one end, gently lift it a little, then move to the other end and do the same. Repeat until the eprom is clear of the socket. Observe anti-static precautions, dont zap the prom with static, touch something metallic first to ground yourself and discharge any nasty flying sparks from your body.



    Now you need to select the type of eprom you want to read or write.

    This is easy, just select "Select Device" from the "Component" menu.

    This will bring up a window like below



    You first select the manufacturer, then the model number of the chip.

    Most chips you will come across seem to be listed, if they are not listed you can add them to the list yourself (pretty easy, just refer to the chips datasheet for instructions)

    MAKE SURE YOU SELECT THE RIGHT DEVICE


    Different chips use different voltages to program them, different programming algorithms are used also, even the pins are layed out differently on some chips.

    Selecting the wrong one can blow your chip - or worse blow the eprom programmer up.

    BE CAREFUL, NO GUESSING, GET IT RIGHT FIRST TIME!!


    If the eprom in question has a sticker over the part number, get a replacement sticker, even if you have to cut up a sticky label or something. Write on it a exact copy of what is on the current sticker. Peel of the old sticker (can be a hard job, you may need to gently scrape it off, or soak it off with acetone if need be).
    Once the sticker is removed, make a note of the part number, then replace the sticker to stop light from accidently erasing any of the contents.

    Operate the lever on the socket, then insert the eprom, the programmer has a little diagram on it showing which way round to put it, and how far up the socket for each size of eprom.

    If your programmer does not make it clear, dont just stick the prom in, refer to the manual to make sure its in the right way round, and in the right place!

    The selected eproms details are shown on screen, so you can double check you have
    selected the right one.



    Now we can read the eprom....

    The software is pretty easy to use, nice big clear buttons



    Before you hit read, make a note of the "end address" shown in the window illustrated above, as this is needed for reading.

    Hit read, make sure the end address is correct, if not change it to the value you
    just noted.



    For most things you just read the eprom with the standard settings, I have not looked
    into the other settings (such as odd / even addresses) yet, so wont comment much on them, except to say these are probably needed for when 2 or more eproms are used together to make a 16 bit bus (some modern fruities for example I think do it this way). The old machine I was reading only had the one eprom for the program, so it
    was straight forward. It has another eprom for the sound, and the procedure would be the same for this, although I have not done that one yet.

    Once you proceed, the eprom will be read, this will take a short while, the bigger the size of the eprom, the longer the wait. But dont worry, it doesnt take long really.

    Once the eprom has been read, it will display its contents in a window.
    Dont edit this window, or you will be editing the eprom, and most likely it will NOT work afterwards (as often they have checksums to guard against corruption, so any edits would need to update the checksum)

    You need to save the contents of the eprom file. The software allows you to save it
    in many different formats, such as motorolla, intel, hex, etc.

    With this programmer if you want to burn a eprom you must save as a motorolla format, but you can save another copy as a hex or bin file for example if you wanted to use the data for a emulator.

    So reading is easy, the only problem you may get is if it doesnt read, you may need
    to go into settings,control panel, system, device manager, com-ports, com1 (or com2)
    Then advanced / port settings, and select 115200 baud, 8 bits, no parity, hardware flow control, use fifo buffers NO.

    (ignore the fact the software is set to 19200 baud, control panel needs to be 115200 baud)

    I will come back later, when not as tired :)
    When I do I will add a little to this, some useful links etc and tidy it up a little.

    Then the next post will be how to burn the eprom file to another eprom..

    See you later!
  •  

    Welcome!

    This blog is so I can document my experiences with DIY electronics.

    I will cover many different topics, starting with eproms, then PIC's, and who knows
    what next. Im not an electronics expert by any means, so always double check what
    I write in case I have made a mistake - if I have, feel free to comment!

    Remember, do not do any electronics work if you are not sure what you are doing,
    as you could easily blow something up, even yourself if you are not careful!

    I will be adding links as I come across them, or remember them, so keep popping back
    from time to time, or add me to your blogroll. Even I dont know what will be covered in this blog, so expect varied content.

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