+ Post New Thread
Results 1 to 8 of 8
  1. #1
    Advanced Member level 3
    Points: 5,602, Level: 17
    Achievements:
    Created Blog entry 7 years registered
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    849
    Helped
    23 / 23
    Points
    5,602
    Level
    17
    Blog Entries
    3

    Chip Enable Program Error with 8051 MCU(AT89S51)

    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
    Click image for larger version. 

Name:	001.PNG 
Views:	9 
Size:	51.1 KB 
ID:	158127

    I checked many times to ensure this wiring to connect with MCU:
    Click image for larger version. 

Name:	89sxx-ISP-circuit.GIF 
Views:	4 
Size:	52.4 KB 
ID:	158128

    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.
    Click image for larger version. 

Name:	IMG_20200311_173416.jpg 
Views:	5 
Size:	592.2 KB 
ID:	158129

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

    Any suggestion ?
    I love my profession, I love my M's Lab. __MKDas

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 30,349, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    9,099
    Helped
    1143 / 1143
    Points
    30,349
    Level
    42
    Blog Entries
    9

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    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.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  3. #3
    Advanced Member level 3
    Points: 5,602, Level: 17
    Achievements:
    Created Blog entry 7 years registered
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    849
    Helped
    23 / 23
    Points
    5,602
    Level
    17
    Blog Entries
    3

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    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: Click image for larger version. 

Name:	89sxx-ISP-circuit.GIF 
Views:	2 
Size:	52.4 KB 
ID:	158130

    I'm not sure if I missing anything else.
    I love my profession, I love my M's Lab. __MKDas



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 30,349, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    9,099
    Helped
    1143 / 1143
    Points
    30,349
    Level
    42
    Blog Entries
    9

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    From the above picture, the IC on the breadboard seems like being AT89C51, not the AT89S51 you mentioned.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  5. #5
    Super Moderator
    Points: 266,359, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    46,544
    Helped
    14165 / 14165
    Points
    266,359
    Level
    100

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    seems like being AT89C51, not the AT89S51 you mentioned
    Good catch! AT89C51 doesn't support ISP (in circuit serial programming).



    •   AltAdvertisement

        
       

  6. #6
    Advanced Member level 3
    Points: 5,602, Level: 17
    Achievements:
    Created Blog entry 7 years registered
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    849
    Helped
    23 / 23
    Points
    5,602
    Level
    17
    Blog Entries
    3

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    Quote Originally Posted by andre_teprom View Post
    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?

    Click image for larger version. 

Name:	IMG_20200312_112921.jpg 
Views:	3 
Size:	545.6 KB 
ID:	158136

    Click image for larger version. 

Name:	s52.PNG 
Views:	2 
Size:	41.8 KB 
ID:	158137

    - - - 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.

    Click image for larger version. 

Name:	list.PNG 
Views:	2 
Size:	130.0 KB 
ID:	158139
    I love my profession, I love my M's Lab. __MKDas



  7. #7
    Advanced Member level 3
    Points: 5,602, Level: 17
    Achievements:
    Created Blog entry 7 years registered
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    849
    Helped
    23 / 23
    Points
    5,602
    Level
    17
    Blog Entries
    3

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    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!!!

    Click image for larger version. 

Name:	Capture.PNG 
Views:	1 
Size:	43.5 KB 
ID:	158189
    Click image for larger version. 

Name:	IMG_20200315_143708.jpg 
Views:	0 
Size:	514.0 KB 
ID:	158190


    - - - 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.
    I love my profession, I love my M's Lab. __MKDas


    1 members found this post helpful.

  8. #8
    Advanced Member level 3
    Points: 5,602, Level: 17
    Achievements:
    Created Blog entry 7 years registered
    Mithun_K_Das's Avatar
    Join Date
    Apr 2010
    Location
    Dhaka, Bangladesh, Bangladesh
    Posts
    849
    Helped
    23 / 23
    Points
    5,602
    Level
    17
    Blog Entries
    3

    Re: Chip Enable Program Error with 8051 MCU(AT89S51)

    Just made this simple USBasp. You can try it too.

    Click image for larger version. 

Name:	IMG_20200316_172837.jpg 
Views:	5 
Size:	534.5 KB 
ID:	158209

    - - - Updated - - -

    Bottom side of the PCB.
    Click image for larger version. 

Name:	00356.jpg 
Views:	2 
Size:	486.7 KB 
ID:	158212
    I love my profession, I love my M's Lab. __MKDas



--[[ ]]--