Forums

Reading code from AT89C51ED2

Started by marco73 4 months ago2 replieslatest reply 4 months ago92 views

Hello!I have a board with the AT89c51ED2 processor. It's work, I see Clock oscillator with my oscilloscope , but doesn't work serial comunication. Somebody Have burnout those ports, and the chip MAX202 connected is burned too (replaced with a new one)

I think some wrong connection with ISP connector. Now I need to replace the microcontroller, but I cant read the firmware.

I Try to use flip , But it give me timeout error . I set the ic to activte the bootloader with the right procedure ( reset during power on, holding PSEN to ground and release reset ).That could confirm serial port damaged (have try with 3 pc)

The question is, could I read the code trought the SPI port?I see on AT89s51 is possible with AVRDUDE, but I don't see any document on AT89C51 , and I cant found in the conf file of the AVRDUDE of my microcontroller.

Thank you for help

[ - ]
Reply by tcfkatFebruary 14, 2022

Hello marco,

the answer is simple: AT89C51 needs 12V Vpp (that your circuit does not provide) while AT89S51 can be programmed in-circuit with 5V only. Reading the code requires of course that no code protection is active.

Regards,

Eric

[ - ]
Reply by tcfkatFebruary 15, 2022
Sorry, I was to fast and I was wrong. The above said is true for the AT89S52/AT89C52 only.

This MCU can be in-circuit programmed using 5V only, if you respect the boot sequence:

at89c51ed2_bootmode1_51004.pngat89c51ed2_bootmode2_28490.png

AT89C51ED2 datasheet

But, if the UART port is physically destroyed I see no easy way to get access to the bootloader. Via SPI is not possible with the existing boot code in EEROM. If you have enough time and need absolutely the firmware you can maybe try via parallel access, with an external ROM. Or add your own bootloader in a presumably empty area of the on-chip EEROM. This works only if no code protection is set, otherwise you have very little luck.



Addendum: the AT89S51 in turn needs 12V Vpp ... what a mess!

AT89S51 datasheet