Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 12th February 2006, 12:34 AM   (permalink)
Experienced Member
 
mstechca can only hope to improve
Default I have to make a better programmer! [re: at89c2051]

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?
__________________
-=: The best low-priced components to troubleshoot with are the speaker and the LED :=-
mstechca is offline   Reply With Quote
Old 12th February 2006, 02:34 AM   (permalink)
Experienced Member
i_build_stuff is on a distinguished road
Default

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...
i_build_stuff is offline   Reply With Quote
Old 12th February 2006, 09:06 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default Re: I have to make a better programmer! [re: at89c2051]

Quote:
Originally Posted by mstechca
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".
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 12th February 2006, 04:55 PM   (permalink)
Experienced Member
 
mstechca can only hope to improve
Default

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.

Quote:
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.
__________________
-=: The best low-priced components to troubleshoot with are the speaker and the LED :=-
mstechca is offline   Reply With Quote
Old 14th February 2006, 12:47 AM   (permalink)
Experienced Member
johnsmith123 is on a distinguished road
Default 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 http://chaokhun.kmitl.ac.th/~kswichit/easy1/easy.htm

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?
johnsmith123 is offline   Reply With Quote
Old 14th February 2006, 12:33 PM   (permalink)
Experienced Member
 
mstechca can only hope to improve
Default

That circuit requires a previously programmed AT89C2051.

I just made one on PCB and now I am still testing it.
__________________
-=: The best low-priced components to troubleshoot with are the speaker and the LED :=-
mstechca is offline   Reply With Quote
Old 14th February 2006, 01:19 PM   (permalink)
Experienced Member
 
evandude is just really niceevandude is just really niceevandude is just really nice
Default

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.
__________________
EEgeek.net
evandude is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 02:17 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.