View Full Version : Programming Error in AT89S52

07-26-2005, 12:15 AM
I tried the AEC software to program my AT89S52 using my parallel port, the programming started also but it gave error after writing two bytes in the flash. I tried it again but the same error occured, it says "Error writing flash!"

I was doing it without an external oscillator, tell me was that error due to lack of external osciallator? I had left the XLAT pins open not connected to anything. I had given +5V as Vcc using a SMPS. If it requires an external oscillator then which one should I take and what frquency? 4MHz-25MHz is the given value in its datasheet. I tried reading the flash and it shows those two bytes written also. I started writing my program from 0500H, has this anything to do from the error?

07-27-2005, 12:01 AM
Hi Devpriya,
I too started with AT89S52 recently. I have developed the In Circuit Programmer for it. What i observed was when i didnt connect the oscillator(external) to the XLAT pins data is not transferred. When i connected the oscillator it identified immediately and the program got transferred instantaneously. Even the datasheet of AT89S52 suggest using an external oscillator when doing serial programming. Hope this info helps.

With warm Regds,

07-28-2005, 01:41 AM
tell me the exact values of the capacitors you used for the oscillator and for the reset pins and tell me which circuit you used to program it and which software you used? What was the frequency of the oscillator you used?

I used 33pF capacitors along with a 10 MHz crystal oscialltor but it didnt work.

I used 1K and 10K resistors and 10uF capacitor for reset pin.

I used the circuit given at the AEC electronics website and used the software used by them..

Please tell me the values, circuit and programming software you used.

I get the error "Error writing flash!". I am using parallel port for programming. Tell me where to learn serial programming if its easier than parallel programming.