Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

[SOLVED] Chip Enable Program Error with 8051 MCU(AT89S51)

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
849
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,308
Location
Dhaka, Bangladesh, Bangladesh
Activity points
7,909
I've no previous experience with 8051 MCUs. Recently I was trying to work with AT89S51 MCU.
I'm having Chip Enable Program Error when trying to upload hex to MCU using Progisp1.72
001.PNG

I checked many times to ensure this wiring to connect with MCU:
89sxx-ISP-circuit.GIF

Tried two different usbasp programmers and in the last made one to test.
I was able to upload hex to Atmega8, 328, and 32 with these 3 programmers.
IMG_20200311_173416.jpg

Whenever I try with AT89S51, same Chip Enable Program Error. Tried changing Crystal with 4MHz, 11.059MHz, 12MHz. Same problem.

Any suggestion ?
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,144
Helped
1,135
Reputation
2,288
Reaction score
1,108
Trophy points
1,403
Location
Brazil
Activity points
53,073
Not sure about what exact procedures you did, but since the message log right bellow give indication of a sucessful Write, I would check how fuses are set ( e.g code protect, oscillator ). Try uploading a simple blink led to check at least if something works, even at a wrong timming.
 

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
849
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,308
Location
Dhaka, Bangladesh, Bangladesh
Activity points
7,909
Yes, I took a hex file of simple blink led from mikroC example file (which I changed the MCU only) and tried to upload that. But can not even erase the AT89S51. Seems like the USBasp can not detect or not getting any response from MCU. I checked the wiring. It was as like this one: 89sxx-ISP-circuit.GIF

I'm not sure if I missing anything else.
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,144
Helped
1,135
Reputation
2,288
Reaction score
1,108
Trophy points
1,403
Location
Brazil
Activity points
53,073
From the above picture, the IC on the breadboard seems like being AT89C51, not the AT89S51 you mentioned.
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
46,758
Helped
13,880
Reputation
28,008
Reaction score
12,519
Trophy points
1,393
Location
Bochum, Germany
Activity points
272,893
seems like being AT89C51, not the AT89S51 you mentioned
Good catch! AT89C51 doesn't support ISP (in circuit serial programming).
 

Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
849
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,308
Location
Dhaka, Bangladesh, Bangladesh
Activity points
7,909
From the above picture, the IC on the breadboard seems like being AT89C51, not the AT89S51 you mentioned.
OH!!!! I did not noticed that before. Dosen't AT89C51 support ISP?

- - - Updated - - -

I have collected AT89S52 and tried again replacing the IC name in the software and in the project board. But same problem. Am I missing something?

IMG_20200312_112921.jpg

s52.PNG

- - - Updated - - -

I found a user guide of USBasp programmer. They are mentioning that the supported MCUs (page: 5), in that list there is no AT89 series. But on the other hand found many guideline online where many people used USBasp to program AT89S52. I've attached the document here.

list.PNG
 

Attachments


Mithun_K_Das

Advanced Member level 3
Joined
Apr 24, 2010
Messages
849
Helped
23
Reputation
46
Reaction score
21
Trophy points
1,308
Location
Dhaka, Bangladesh, Bangladesh
Activity points
7,909
Finally I solved after working on it for last few days. Now I can program AT89S51 with USBasp. The problem was the USBasp Firmware. I found that the Chinese one can program 8051 series MCUs. But the standard German one doesn't support 8051. So I took the Chinese one and read the flash and eeprom. Then burned it into a fresh Atmega8A which I used as the MCU of the USBasp programmer. Now I can upload the hex to 8051!!!

Capture.PNG
IMG_20200315_143708.jpg

- - - Updated - - -

Instruction to others who are having similar problem is collect a Chinese one, Connect with it to another USBasp(any) programmer. Read the flash and eeprom. Then burn these two files to your Atmega8A MCU to make a new USBasp programmer which can program 8051 series MCUs.

- - - Updated - - -

Or I've attached these files. You can use these too.
 

Attachments

Toggle Sidebar

Part and Inventory Search


Welcome to EDABoard.com

Sponsor

Sponsor

Design Fast


×
Top