universal programmer

That may be, but since you're just "getting into MCUs," you might as well get some chip by using a computer if the computer had "access" to all the pins on the

Yes it is. In fact, you don't even have to write the software yourself -- there are plenty of freeware programmers out there, like

formatting link
. Most MCU companies give away their programming software anyway, if you're willing to wire up (or buy a clone of) the company's own programming pod (they vary greatly in complexity -- some are nothing more than a buffer chip or two and a handful of resistors, others contain pre-programmed MCUs themselves, etc.).

Pretty much, yes... although if you're looking for production speeds, there's often a parallel programming mode than -- for some devices -- is much faster. Those fancy universal programmers will usually have multiple DACs in them to support "weird" programming voltages as well.

In general that's true. The tricky part is that, for complex chips, sometimes getting the programming information is difficult. (The manufacturer may want you to sign an NDA agreement, and may not even talk to you if you're just some single guy who's doing this for his own edification.)

...and being able to route those voltages/clocks to multiple pins easily (older universal programmers had adapter sockets to do this). And being able to generate precisely timed pulses (for some devices), which is difficult to do under, e.g., Windows.

What you're talking about is more in line with the capabilities of the Any ideas?

Goto somewhere like AVRFreaks.Com or pick up a copy of Nuts & Volts magazine -- you see literally dozens if not hundreds of inexpensive programmers that should cover your needs, as well as plenty of schematics for rolling your own.

---Joel

Reply to
Joel Kolstad
Loading thread data ...

Since I'm trying to get into MCU it seems I will need a programmer to get anywhere. From looking online it seems that any "decent" programmer is pretty expensive(1k+) and those that are cheap seem to offer very few features and few chip support.

I was thinking that it shouldn't be very difficult to program just about any chip by using a computer if the computer had "access" to all the pins on the chip. From looking at a few data sheets it seems that its very easy to program a MCU by simply handling the procedure through the software.

heres a quote of how to program the PIC16C84

The device is placed into a program/verify mode by holding the RB6 and RB7 pins low, while raising the MCLR pin from VIL to VIHH (see PIC16C84 EEPROM Memory Programming Specification (DS30189)). RB6 becomes the programming clock and RB7 becomes the programming data. Both RB6 and RB7 are Schmitt Trigger inputs in this mode. After reset, to place the device into programming/verify mode, the program counter (PC) points to location 00h. A 6-bit command is then supplied to the device, 14-bits of program data is then supplied to or from the device, using load or read-type instructions. For complete details of serial programming, please refer to the In-Circuit Serial Programming Guide (DS30277). For ROM devices, both the program memory and Data EEPROM memory may be read, but only the Data EEPROM memory may be programmed.

It seems to me that if most chips follow a very similar method where you use a few pins(lets say arbitrary too) to get it into program mode and a serial communication on one pin to transfer the code then it would be extremly easy to program any of those chips by using a computer(with just about any number of pins). Is this the actual case?

Lets suppose I have a device that simply lets me access any of the pins on a chip from software.... could I then not use the software to program the chip? If so, is this true of pretty much most of the MCU's and EEPROMS or just a few? If not, what are the reasons why I couldn't do this?

Only thing I can think of that could prevent it from being so easy is supplying the proper voltage to the right pin(but this shouldn't be that hard) and getting the right clock into the chip. Other things like having ot have resistors and stuff on certain pins for certain reasons and such would surely scew this method up as then it might become to complicated to do(well, it would be just easier to buy a "universal programmer"). If there are no resistors needed and I can generate the clock from the software in a computer and potentially the voltage(or just allow the voltage to be selectable by the hardware and on what pin it should be on) then I can't see why this would be that difficult. Definately would be much cheaper to do than buying a 1000$ programmer.

Is it safe to say that the generalization of the above procedure for the PIC16C84 applies to almost all other MCU's? And what about those MCU's that cannot be programmed in that way, what makes them so different?

Any ideas?

Thanks, AD

Reply to
Abstract Dissonance

AD,

Is your goal to "build a programmer" or to "program chips".

As Joel says, buy the cheapest tools for the target processor and start learning that one.

If you don't like that one, buy the cheapest tool for your next choice.

Ect.... donald

Reply to
Donald

Well, the problem is that I don't want to limit myself to some specific chip. I'm not sure exactly what I will end up using in the long run and I might end up going into a lot of small projects that will require different capabilities. I could just end up going overkill and getting a very good MCU and learning that one and using it for all my projects but I'd rather not go that route... I will need a programmer either way and will probably make my own anyways so I figured that if I'm going to make one I might as make it to handle several types of chips. I'm not interested in speed so much as I am "universality".

Ok, I was going to write the software myself since it shouldn't be the hard(I'm much more comfortable with software than hardware as I've been programming over 10 years(and I actually like assembly language better than high level)). The main thing I would be worried about is getting the hardware to work right for most chips without screwing them up.

Well, I still can't imagine one that would cost 30k+ would be that much different than one that is 1k ;/

And those chips I probably wouldn't use in the first place. I'm more concerned with just having somethign that can program a wide variety of common chips. I saw one programmer that costs 200$ and it says it can program just about any 8-bit MCU but what happens if I want to use a 16 or

32bit one? I can't figure out why it would have been so much more difficult to support any bit size. So basicaly I end up spending 200$ for something that may or may not end up working for me if I decide to move on to "better" chips.

yeah, but I could just have the "user" manually select the right voltage to the right pin instead of trying to do it in software. I'm not concerned with efficiency as much as I am with just getting it to program the chips and to support a wide variety. I wouldn't mind spending a min or two setting up the thing to support some chip and it taking another min or two to program it.

ok, I'll look around some more and see what I can find. Some issues I've had with some of the programmers is they just seem to be limited by bit size(8 bits, for example) and number of pins supported. I see these as unnecessary limitions that can easily be fixed? Maybe I was just looking in the wrong place though.

ok, Thanks for helping. I'll look into it more and see what I can find.

Thanks,

AD

Reply to
Abstract Dissonance

This is my understanding. I invite others to offer constructive correction if I mis-speak.

There are two distinct classes of device programmer. The dividing line is whether they're dedicated to memory devices, such as EPROMs, EEPROMs, FLASH devices, etc., or whether they are true 'universal' programmers with pin-driver architecture.

Dedicated programmers are fairly simple units, designed to be inexpensive and to perform a limited range of functions for just a few families of chips. This is because the programming algorithms required for EPROMs and such are not particularly complex in themselves.

The next step up is an architecture called 'pin-driven.' Programmers based on such technology are at least an order of magnitude more complex -- and, consequently, more expensive -- than those that are not pin-driver capable.

Neat thing about pin drivers is that they're software-controlled. You can program any pin in the programming socket to do anything you need it to do: Vcc, ground, address, data, programming voltage, programming waveform, whatever. Pin driver technology also gives you very precise control over signal timing.

This means that you can, in theory, set them up to handle read/program for any imaginable programmable device. Functionality like that does not come cheaply.

It's a lot more complex than it may appear at first glance. True "universal" programmers are, in fact, small dedicated-purpose computers designed to do exactly as you describe.

Example: I use Data I/O's Unisite and 2900 series programmers. They both require their own operating system, and they both contain all the elements of a microcomputer: CPU, memory, hard drive (in the case of the Unisites, anyway), and I/O functions.

The Unisite and 2900's are most definitely pin-driver based, and the pin driver cards alone are complex enough to make me cringe. Each pin driver board (the Unisites have 17, with each board capable of driving four pins of the programming sockets) has a customized CPLD on it in an 84-pin PLCC package, and enough logic and discrete components that it looks like a tiny city under a magnifier.

Coordinating all those pin transitions and data flow is one very good reason why PIC programmers are either inexpensive, and dedicated solely to PIC chips, or universal and a lot more expensive.

They don't. Every single manufacturer uses different algorithms and pin levels to program their chips. Algorithms from Intel, for example, would be worthless (and probably even damaging) to a PIC chip, and vice versa.

The bottom line: Good programming hardware is a tool. An investment. Treat it as such, bite the bullet, and shell out the bucks for a unit that meets your needs.

HOWEVER -- this does not necessarily mean you have to shell out thousands for the latest/greatest stuff. I bought my hardware used, at a fraction of what DIO wanted for it new.

Also, I've seen Advin 'Pilot MVP' programmers (really outstanding units, actually) go on Ebay, brand new, for around $500 (they're normally $900 or so), and they have free software updates for life.

Such a unit will most certainly read/program any PIC chip you may choose to play with (though you will need an adapter if you want to do something other than a DIP package), not to mention a whole raft of other memory and logic devices. If I were shopping for a second programmer, I'd go with an MVP in a heartbeat.

Happy hunting.

--
Dr. Anton T. Squeegee, Director, Dutch Surrealist Plumbing Institute.
(Known to some as Bruce Lane, ARS KC7GR, 
kyrrin (a/t) bluefeathertech[d=o=t]calm -- www.bluefeathertech.com
"If Salvador Dali had owned a computer, would it have been equipped
with surreal ports?"
Reply to
Dr. Anton T. Squeegee

Well, if you want to undertake a project that's 10x more complex and difficult than just building/buying a bargain programmer for each chip type, then go for it.

Look at some data sheets and programming algorithms for the various types of chips that you're contemplating supporting with this "universal programmer," and it might help you get an idea of the magnitude of the task you're proposing.

Good Luck! Rich

Reply to
Rich Grise

At work, I use an expensive programmer from BP Microsystems that will handle almost any device made (I think we paid ~C$7000 or so for it) - however, I've just ordered an In-System Programmer kit costing C$32 that will program Atmel 89Snn devices while they are still installed in the final PC board - I figure it is easier to use that than to pull the chip and put it in the BP Micro programmer every time I want to change the program (which is quite often, during development.)

If you're just beginning in this field, you should probably pick a processor (or processor family), and get the least expensive programming solution that the processor vendor offers.

The universal programmers like my BP Micro unit are really only necessary if you know you will need to program a wide variety of parts (sometimes with little warning!), and the device vendors don't provide any programming solution for them.

--
Peter Bennett, VE7CEI  
peterbb4 (at) interchange.ubc.ca  
new newsgroup users info : http://vancouver-webpages.com/nnq
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
Reply to
Peter Bennett

I use this. It's good. ~ $333

formatting link

Conitec's new fourth generation GALEP-4 is a professional field programmer of pocket-sized dimension. The new Galep supports EPROMs, EEPROMs, FLASH EPROMs, serial EEPROMs, Microcontrollers, GALs and PALCEs - handling up to DIP40 devices without requiring additional adapters or circuitry.

Socket adaptors can be pricey for what they are though.

Graham

Reply to
Pooh Bear

I suggest you read up about ISP (In System Programming). It will greatly simplify your life !

In general devices which support ISP are more modern and have simple programming interfaces - often they can be programmed directly from a parallel port or by a very simple adapter.

Much of the complexity you describe is needed only to program legacy devices, which you will probably never use.

There are many other factors involved in the selection of a chip, and any choice is always going to be a compromise anyway. In your position I'd pick a family of chips that were cheap and easy to program (I mostly use AVR) and see where that took me. I'd spend my $1000+ on useful tools like a scope or logic analyser.

Dave

Reply to
Dave

For myself, using microcontrollers in DIP packages (no SMD) from 8 to 40 pins, I use a 40-pin ZIF socket (where the uC to be programmed is inserted) and also a small 50-pin connector which can be a DB-50. The first 40 pins of this connector are connected directly to the ZIF socket pins and five other pins are connected to the programmer well known signals, that are: MCLR (or Vpp), Vcc, ground, DATA and CLOCK. These five signals are then hardware-strapped to the appropriate first 40-pins onto a 50-pin plug that fits into the connector for the appropriate uC to be programmed (many share the same programming pinouts). If different uC with a new programming pinout is released, I just buy a new

50-pin plug and hardware-strap it for the new pinouts, that's all! Take a few minutes and soldering iron. So far, I could have coped with the many different programming pinouts Microchip (and others) have conceived to make our lives more difficult to program their chips :)

Johnny

Reply to
J. David

I'm good with my EMP-11

formatting link

Unfortunately, both the EMP-11 and the Galep-4 are parallel port devices and that's a rapidly disappearing interface, especially on the notebook PCs that are so handy to carry around the lab with the programmer. Both of Needham's USB-capable programmers are kind of pricey (I know, these things are relative).

I'm hoping that either Needhams or the Galep folks will manage to come out with a USB version that's at or near the same price point as the current EMP-11 or Galep-4 by the time that my current notebook dies.

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb
[snip...snip...]

Peter hits the key issue here. In-system programming is far and away the best option, whether it's JTAG, a manufacturer's own protocol, or a serial bootloader. You really, really, really don't want to have to pop a chip out over and over again during development when the alternative is having to do nothing more than clicking a "Program & Verify" button.

--
Rich Webb   Norfolk, VA
Reply to
Rich Webb

Why not? I'm sure to learn something, right? Hell, I might actually end up with something that works too?

I don't see it as being very difficult if most of the stuff is done in the software. If almost all MCU's are programmed by turning on and off a few pins then serially(or maybe parallel) transfering data on another pin then it seems quite simple IMO. The few difficulties might lay with having to setup specific hardware for certain chips(like having to add resistors or special clocks and stuff). But just cause they use different pins for the same function doesn't seem that big of a deal. Seems that an FPGA can handle that pretty easy(I'm still looking into how to do this easily though).

AD

Reply to
Abstract Dissonance

Ultimately to program chips. But I don't want it to become a hassle where I end up having to buy a new programmer every time I switch chips. Since I'm new to the hardware side of chips I might end up going threw many types of chips pretty quickly. I wouldn't want to order a new chip then learn that I can't program it with a 200$(or more) programmer I brought.

Yeah, but I have no target processor. I have no exerience with different types of chips and the only experience I have had with hardware like this was once a friend was taking a DSP course and asked me to help him program... It was really easy to do stuff so I figure that its probably not all that hard to do... but seeing that there are thousands of different chips out there makes it kinda hard to know where to start... If I just pick some chip and get its specific programmer and spend 50$+ then maybe a week later I'll move on to another chip for some specific application and have to spend 50$... then that might continue for several weeks.

I just feel that building a programmer might be just as fun though and actually be pretty usefull.

AD

Reply to
Abstract Dissonance

Ok, basicaly I want to create a pin driver then. Something that I just have access to all the pins on any chip in the software so I can deal with all the programming problems there. I'm sure that I could easily make a specific programmer that will program the chip I have as long as the procedure is outlined in the data sheet... but I'd rather not do this every time I get a new chip.

Well, for me, I would have no problem with the software part of it. I've programmed low level devices many times on the computer and I have a fairly good grasp of it(well, its been a while since I've done a lot of it but it should come back quickly). The main problem I have is that I don't have much experience with digital electronics. I've been reading a lot about it lately trying to learn as much as I can and it seems pretty damn easy actually. I just figured that it might be interested to try and make my own programmer that can handle many different types of chips. I just can't see it being that complicated though if one has the "right tools".

Well, the way I see it is that one doens't need to have a "pin driver card" for each set of pins(4 in your example)... why? because only 4 or so pins are used on any chip. So in this example one would only need one pin driver card. That is, only if the 4 pins that are used to program the chip are in line and fixed... this is why I asked about a "permutation" device. If one can take say, 40 arbitrary pins, and reorder them so the programming pins are also pins 0-4(or 0-8 or whatever) then one could just use 1 pin driver(or 2 if one supports more pins)...

Theres another way I was thinking too.

Say you have n pins on your chip, you could serially transfer from your serial port data so that the data is grouped in n bits. the first bit goes to the first pin, the second bit to the second pin, etc...

so one would just have to run the serial interface from the computer n*faster and maybe have some sample and hold circuit on each pin so that it runs smooth. There would be a device to convert the serial data into parallel data on the "programmer" simply by grouping the bits into groups of n bits and then "dishing them out" to the proper pins.

Seems like it would be quite simple to do and one would have access to all the pins in the software(one would just have to pack the bits properly and deal with the real problems(I guess timing and maybe some others) that might exist).

Again, my whole goal is to see how much can be done in the software. If I can get it all done in the software then its pretty easy to do. The hardware is what I'm worried about since I don't have a lot of experience with it(I might just have to go ahead and play around at first with some MCU's to get an idea of what it takes).

I don't see why it should be that hard? Specially not something that would cost more than a new car(for some programmers).

Algorithms = software? pin levels = programming voltage levels... most MCU's fall withing 1.8 to 18 volts, right? Even if I had to manually select the proper voltage using a selector switch and to which pin it went wouldn't bother me much. I don't care much about speed or efficiency.

True, but for example, I saw a programmer for 300$ that only programmed

8-bit chips ;/ WTF is that? So I'd have to have to get a new programmer if I wanted to move to 16 bits? then a new one for 32-bits? or just buy one that does them all for 1000$+?

I might end up just getting some chips and hacking the programming of them for now just to get something done.... or I'll build one of those specific programmers that have schematics online until I learn more about all the complexities

Thanks, AD

Reply to
Abstract Dissonance

Ok, I might get that if I end up having to buy one ;) I saw it before too but it seems like it is more universal than some.

What I don't like is that it doesn't handle 32-bit... Now this isn't probably a bit deal as I probably won't ever use 32-bit chips but is it really that hard to support it? After all, its just a matter of turning on and off pins, right?

One thing I'd like to have is the possibility of using more pins than 40, it seems that most programmers are limited to this but the most expensive. I feel that this is kinda an arbitrary limitation(but ofcourse could be wrong). After all, only a couple of pins are actually used in the programming process but are just "arbitrarily" placed among the leads on the chip(which is what makes it more complicated). By having a controllable reordering of the pins so that one could put the "program pins" up first should make it much easer?

Although I guess that isn't such a big deal cause one just has to buy adapters?

Thanks AD

Reply to
Abstract Dissonance

Yeah, but for some reason I like to make things hard at the beginning ;) The way I see it though is that any MCU has to be programmed by just turning on and off certain pins... thats pretty simple, right? This would be a piece of cake in software... for me, its just how much of it I can do in software... if I can get 90% of it in software then I think its doable... if its 50% then maybe its not worth it.

Ok. I suppose I can always just "hard wire" them so I can program it the "long way". In my mind I have a "vision" where I just have to pop the chip on a board and then run a piece of software on the computer and selec the chip type(and hopefully there is a module that is used that has the programming algorithm in it) and then load up the file I want to send.... then I can go take a piss or whatever I want and come back and I have a programmed chip. I could be totally off base though as I don't have much experience with the hardware side of these things... but looking at a few of the data sheets seem to give the impression that its very simple to do.

Thanks, Jon

Reply to
Abstract Dissonance

Well, for now I'm not so much concerned with efficiency as it doesn't bother me to much to do the switch... although I do see your point and surely there are ways around it(such as doing the circuit on a breadboard and using alligator clips and stuff to attach the chip to the programmer or something like that?

Thanks, AD

Reply to
Abstract Dissonance

But wouldn't it be nice to have a ZIF socket on your programmer that supports 100 pins? ;) Surely the complexity to handle 10 pins or 1000 pins is virtually the same... most of those pins are useless and don't need to be messed with? If so then if one could "rearrange" the pins so that only the ones needed are put at the top then its like just having a 10 pins or so(or whatever you want) and one wouldn't need to actually handle all those useless pins.

Thats my dream though. I figure that would could have some software code that looks like this:

out Pin3, 1 out Pin13, 0 serial_out(Pin19, bufffer)

while some other chip might be

out Pin1, 1 out Pin2, 0 out Pin8, 1 serial_out(Pin73, bufffer)

(hypothetically... it would be more complicated than this but just to give an idea)

But the problem is having "access" to all those pins... one needs a sorta router to route the pins used to the actual pins on the chip... I'm not sure if this is all that difficult or not... maybe the real issues just lie in the pratical side of things where certain chips have different characteristic like different voltages and clocks and all that(but I still feel it shouldn't be all that hard to do).

Thanks, AD

Reply to
Abstract Dissonance

Many microcontrollers now have "in-system programming" capability - you just need to add a 10 pin connector to your target board, and use an inexpensive programming pod sold by the device manufacture to transfer your program into the microcontroller. In some cases, the details of this "programming pod" are given in the manufacturer's application notes or data sheets.

As I indicated above, the C$32 Atmel ISP programmer will handle all of Atmel's AT89Snn parts (and maybe their AVR parts, but I haven't checked that),so I will have a wide selection of parts to choose from if I find that the part I'm currently using isn't suitable for the next job.

When changing device families, you need to get new development software, and perhaps learn a new instruction set (if you program in assembly) as well as possibly getting a new programmer pod, so the new programmer is a minor consideration.

--
Peter Bennett, VE7CEI  
peterbb4 (at) interchange.ubc.ca  
new newsgroup users info : http://vancouver-webpages.com/nnq
GPS and NMEA info: http://vancouver-webpages.com/peter
Vancouver Power Squadron: http://vancouver.powersquadron.ca
Reply to
Peter Bennett

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.