Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

I have to make a better programmer! [re: at89c2051]

Status
Not open for further replies.

mstechca

New Member
Its me again with yet, another thought 1/2 stumbled on.

What I want to create is an ATMEL AT89C2051 programmer where more is done through hardware.

There are about three programmers which I have found on the internet, but they require too much software interaction.

To be specific, here is what I want to achieve:

as soon as the power to my circuit is turned on and the first AT89C2051 chip is inserted, it will read the first signature byte of the chip. If it is valid (1E according to the docs), it will then send a flag to the parallel port indicating that the unit is ready to accept incoming raw data. I want the computer to make the assumption that my circuit is an old dot-matrix printer.

Let's assume that I made a binary file containing acceptable instructions for the microcontroller called "boo.bin". If I issue the dos command "copy boo.bin PRN" the following will happen:

The contents of boo.bin will be sent down the parallel port, one byte at a time. The first time data appears, the circuit erases the previous contents on the AT89C2051, and then it programs the first byte. Then the rest of the bytes are programmed.

BUT, everything needs to be synchronized. Everytime something is happening, whether the chip needs to be validated, erased, or written to, the busy flag must be active, so that no bytes are lost.

Now here is the question I have been trying to answer myself.

How do I do this using the fewest number of chips possible without using a second microcontroller that is already programmed?
and how do I maximize programming speed?
 
Is there some reason it can't have another uC in it? If it needs to be something you can download and just build (assuming you're starting with no programmer), you could use tri-state buffers tied to a switch to make it go into a programming mode for its own controller.

On the other hand, this seems like it would be a bit too narrow-focused to be a good first programmer...
 
mstechca said:
Let's assume that I made a binary file containing acceptable instructions for the microcontroller called "boo.bin". If I issue the dos command "copy boo.bin PRN" the following will happen:

As you're writing the program on a computer, and using an assembler running on the same computer, why not use the computer to do the programming?. This is how most programmers work, ones which don't use a processor on the programmer itself - which you require a computer based programmer to program in the first place.

I doubt you will find a hardware based one, it's completely pointless and a total waste of time.

Simply write yourself DOS programmer software, and you could then issue the instruction "prog boo.bin".
 
I want to try to make it OS independant as well. So if I wanted to use it in Linux, I could. If I wanted to use it in Windows, I could.

All the computer needs to do is treat the circuit as a standard printer.

Is there some reason it can't have another uC in it?
Yes. I don't have any microcontrollers programmed yet, and if a microcontroller that is controlling the one that is to be programmed ever loses its information, then the whole circuit is shot.
 
89C2051 programmer

I built a programmer similar to the one on kitsruscom. It uses a terminal program for communication. Very reliable in all versions of windows!

The unit only relies on the PC for receiving files, if you are erasing, locking, reading, etc you do not need the PC.

you can use the schematic at **broken link removed**

then just write your own code for the 89C2051 micro on board. That's what I did, real easy! There is even a protel single sided pcb layout to make the board.

hope this helps?
 
That circuit requires a previously programmed AT89C2051.

I just made one on PCB and now I am still testing it.
 
doing it with another programmed uC is the only way I have seen it done, for the more hardware-based programmers. It certainly seems like the intelligent choice, there is a lot of work to be done in programming a microcontroller, and there are probably differences in programming between various devices, so making a logic circuit to do it all would be insane.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top