8051 not working after flashing the program.

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
Update: The issue is resolved now. Please check my update here: https://forum.allaboutcircuits.com/...fter-flashing-the-program.177718/post-1613102 for details on the issue. The circuit is now successfully implemented, even on hardware.

I am a beginner trying to learn how to flash programs to microcontrollers. I am using Arduino as ISP. When I flash ATMEGA chips there is no issue and the code works fine. But when I try to flash AT89S52 using the same apparatus, apparently the code is flashed, but the microcontroller does nothing. I have been trying to work it out, to no success.

Any guesses where can I be wrong.?

PS: I don't have a schematic but I will attach image of the circuit that I created on breadboard over here.

Connections are :
40 to VCC, 20 to GND, 31(active low EA) to GND, all ISP to respective pins of Arduino and also an led to P0.0 with a pull-up (doesn't work with or without it)

And I have changed the chip like three times, same issue persists

I am using a 11.059MHz crystal with 22pF capacitors.
 

Attachments

Last edited:

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
Also I am using AVR DUDE's command line interface for flashing the hex code using Arduino as ISP and yes, the ISP sketch is already uploaded on the uno.


Thank you in advance.
 

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
I have to ask...is a bootloader
required and is one present on the AT89S52?
I am not sure and I have no idea as to how do I upload one on it. Using arduino ide, I still have to select the board and the chip, and I have no idea how and what json file should I use..

YES, IF IT's NOT ALREADY OVBIOUS. I AM SO CONFUSED
 

DickCappels

Joined Aug 21, 2008
7,147
I was in contact with a fellow who programmed an AT89S52 a few years ago. He thought he could use the AVR ISP programmer because it was on the menu - wrong. He contacted Atmel and was told to use FLIP to program the chip. Fortunately Microchip has retained FLIP https://www.microchip.com/developmenttools/ProductDetails/FLIP

If you go to a site frequented by Arduino types (we have some on here) you might find out how they program the AT89S52, but I would bet it needs a bootloader on the chip first. That takes you into a chicken-and-egg problem right away. I wish I could help more. Good luck to you!
 

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
I was in contact with a fellow who programmed an AT89S52 a few years ago. He thought he could use the AVR ISP programmer because it was on the menu - wrong. He contacted Atmel and was told to use FLIP to program the chip. Fortunately Microchip has retained FLIP https://www.microchip.com/developmenttools/ProductDetails/FLIP

If you go to a site frequented by Arduino types (we have some on here) you might find out how they program the AT89S52, but I would bet it needs a bootloader on the chip first. That takes you into a chicken-and-egg problem right away. I wish I could help more. Good luck to you!
Thank you so much man, let me try this and post some updates later.
 

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
Update: Thank you everyone for sharing your valuable insights into the matter. After careful inspection of my circuitry and process, I'd realized that some of my connections were faulty, and the program used for LED Blinking had very smaller delay. Fixing the delay, and especially fixing the connection of pin 31 (EA'/VPP) to +5V instead of GND allowed the program to get flashed in even with Arduino ISP.

The issue is resolved, and the circuit seems to work fine now.
 

Thread Starter

Mayank_2606

Joined Jun 10, 2020
46
Congratulations on getting it to work!

If I may ask, which particular programmer (hardware and software) did you use?
So I used the AT89S52 as the microcontroller on a solderless breadboard connected to an Arduino UNO via ISP. I used the command-line interface of AVRDUDE to program the microcontroller.

I hope that answers it. If not I can share the commands used.
 
Top