error with self built programmer for at89c2051-Plz help :)

Status
Not open for further replies.

ak13

New Member
Hi guys,
I built a programmer(software in TurboC/DOS) with a single octal latch used on an bi-directional LPT port.It reads the signature bits perfectly.erases the chip perfectly.
When i write some data it writes (gives correct data polling) but when i read the programmed sample data it gives mismatched add/data sometimes and correct add/data othertimes...
What could be wrong ?

Tested the circuit independenltly , seems perfectly fine....
 
Re: error with self built programmer for at89c2051-Plz help


Can't help on that programmer, but as you appear to have both built the hardware, and written the software, your first problem is trying to identify which might be faulty?.

The best way (if it's at all possible?) is to try your software on compatible known working hardware, or your hardware on known working software. This way you can isolate the problem - otherwise it's VERY difficult to track it down!.
 
Do you have the circuit available for us to see?

Also, you want to make sure that the code you are writing is compatible with your hardware. Because you designed the hardware without providing a schematic, we cannot tell you what sequence of commands to send to the LPT port.
 
Heres the circuit i made..

Heres the circuit,
I also tested all the pinouts/voltages independently ... all working fine..
I also know Rst/Vpp circuit is not THE best...but still it works if i dont use the reg. ICs for long as they heat up...
 

Attachments

  • cir-1.gif
    6.8 KB · Views: 808
Two things!.

1) Don't post diagrams as JPG, it makes them poor quality and too large, use GIF instead - 100% quality and much smaller file size.

2) Is that the complete circuit?, or have you left many of the components out? - in particular there are many capacitors missing, which would probably stop it working.
 
Yeah...

Ya thanx for the advice ...

-Thats the complete circuit
-I didnt use any capacitors..cud u please help where i wud need them ..

It does read the signature bytes well though..
And it does read the written data perfect once in a while after repeatitive reading though...
 
There appears to be nothing in your schematic that shows whether the correct data went through successfully or not.

To start, you might want to look at implementing a magnitude comparator IC in your circuit. Have the data sent to the chip once, and have the same data sent again, but this time, synchronize the chip with the data from the LPT port. If at least one byteis different, the magnitude comparator will output something different, and then you can take this output to a pin on the port that represents "error" status.

Capacitors are necessary if you are adding a timing circuit. Because you are using a control pin to control the clock, a capacitor should not be necessary.
 
Re: Yeah...

ak13 said:
Ya thanx for the advice ...

-Thats the complete circuit
-I didnt use any capacitors..cud u please help where i wud need them ..

For a start both voltage regulators require capacitors on both their input and output, as close to the pins as possible, as specified in the datasheets - these are absolutely vital, and you shouldn't ever leave them out!. 0.1uF should be fine, although they aren't terribly critical, it's just to stop the regulator oscillating.

You should also place a capacitor across the HT supply to each chip, again as close as possible, 0.1uF to 0.01uF should be fine.
 
ok...


Thanx Mr. Nigel & Mr. Mstecha...i'll do that.

Please cud you also tell me if the equation 11.5v<Vpp<12.5v is critical in atmel microcontrollers..

Thanx for all the help
AK...
 
Dear sirs,
I connected capacitors as adviced with no luck...
also attached another LPT port of another computer to the data line to monitor the data being sent - it also is accurate...

BUT... still when i write all 0's then read/verify returns successfully !!
other times reads/verifies first 5-10 bytes successfully...

Please Help...i am a totally newbie to microcontrollers but have made successfull programs to read/write few eeproms of cameras & TVs , a Universal remote control unit on the LPT...etc.

And its not tht i cant grab my hands on a decent programmer...
but the fun of making your own programmer...

What mistake cud i be making...

Noted every i/o on the pins of the ic by a scope and seems to be according to the datasheet....
 
Re: ok...

ak13 said:
Please cud you also tell me if the equation 11.5v<Vpp<12.5v is critical in atmel microcontrollers..

Thanx for all the help
AK...

Yes it is.

Vpp = programming voltage. I personally apply 12V to VPP to program the chip, 5V to reset it, and 0V (ground the pin) for normal operation.

Have you thought that a verify operation isn't necessary if the chip works afterwards?

In fact, you can tell that the chip works just by having it reveal the correct signature bytes.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…