Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

89S51, 89S52 ISP Programmer using serial port or USB

Status
Not open for further replies.

ctownsend

Advanced Member level 2
Joined
Nov 27, 2004
Messages
575
Helped
93
Reputation
188
Reaction score
63
Trophy points
1,308
Location
Canada
Activity points
3,697
Hello everyone,
There are always many posts here asking about ISP programmers for the atmel 89S51 or 89S52 mcu's. Most commonly available are the FREE programmers that use the parallel port of your PC.

These programmers are not reliable, or do not work consistently on some parallel ports. If you happened to get stuck with a motherboard on your PC like mine, you would be lucky to get the programmer to read the signature bytes especially with windows XP or higher. These days computers are no longer equipped with a parallel port. I have been using this programmer for a few years now reliably even with a USB to serial adapter cable.

I use the 89S series mcu's quite a bit because they are inexpensive and easy to program (no fuses, or other problems). I wanted an easy to use programmer that would allow me to program the 89S mcu's in circuit without removing it every time.

I did not want to go through all the trouble to write a windows application, so I thought I would just use an existing one and modify the code in the programmer to do ISP operations instead of high voltage parallel programming as in the 89S51/89C52. I chose this one:

**broken link removed**
The ezdl4.exe has nothing to do with me and does not need to be changed to work with this programmer.

The circuit I chose was the same circuit as an avr910 programmer except that an 8051 device is used for the programmer. (the reset circuit will be different and the crystal will be 11.0592MHz) I chose this because I already have an avr910 programmer board therfore I would not have to go through the trouble of making another board.

Have a look at the schematic below. You can use any 8051 mcu for the programmer as long as you adhere to the pinout, and it must hold at least 4K in size. The circuit can take power from your target, or supply power to the target, if the power from the programmer (as with the avr910 programmer) is connected to your target circuit.

Now the only problem is: Somehow you have to get the code into an 8051 MCU. If you do not have a programmer, this will be a problem. Once that is done you will have a very reliable programmer.

Everything is included in the zip file. Please read the readme.txt for instructions.
Any suggestions are welcome. Please post them here.

ctownsend
 

Attachments

  • ez_isp_1095.zip
    203.4 KB · Views: 1,417

In the circuit diagram MISO, MOSI are open,,where do i have to connect them,,
 

    SIVA37

    Points: 2
    Helpful Answer Positive Rating

    abilrajpr

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
MOSI, MISO, SCK, RST are connected to the MOSI, MISO, SCK, RST pins on the 89S device.
 

    V

    Points: 2
    Helpful Answer Positive Rating

    merdas

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
In the text file given in the rar, it is also said that 89CXX can also be programmed. But how? They are not ISP compatible? Any modifications needed?
 
  • Like
Reactions: mhtariq

    V

    Points: 2
    Helpful Answer Positive Rating

    mhtariq

    Points: 2
    Helpful Answer Positive Rating

    nguan2099

    Points: 2
    Helpful Answer Positive Rating
can i program 89s8252,89s8253 with this programmer
 
  • Like
Reactions: mhtariq

    V

    Points: 2
    Helpful Answer Positive Rating

    mhtariq

    Points: 2
    Helpful Answer Positive Rating
pranam77 said:
In the text file given in the rar, it is also said that 89CXX can also be programmed. But how? They are not ISP compatible? Any modifications needed?
In the text file:
This code will allow EZDL4 to operate as a host for
ISP programming on 89S51 and 89S52 devices only.

The lines below refer to the code for the programmer hardware:
As long as you follow the pinout, the code can be used in
most 8051 mcu's.
Successfully tested the code in the following
8051 devices:

20 pin devices:
AT89C2051, AT89S2051

40 pin devices:
AT89C51, AT89C52, AT89S51, AT89S52.

the 89C devices do not accept ISP Programming.

Added after 7 minutes:

santoshaxl said:
can i program 89s8252,89s8253 with this programmer
NO, I did not add these devices in the code and probably never will. There are other ISP programs that support these devices, there was almost nothing available in an ISP programmer that was reliable for 89S51/52. I have tried them all, nothing worked 100%. USBASP works with avrdude, however you cannot program the lock bits. In my code, all of the lock bits will be programmed if the lock box is checked in EZDL4.exe.

The avr910 code supports the 89S8252 & 89S8253. Avrprog is very reliable, much more than the parallel port programmers. Avrprog can also be used with a USB to Serial cable if you do not have a serial port.
 

connection between serial port and max232 may be wrong it is connected just opposite if we look the 8051 micro controller and embedded system by mazidi
 
santoshaxl said:
connection between serial port and max232 may be wrong it is connected just opposite if we look the 8051 micro controller and embedded system by mazidi
I don't remember where I got that diagram. You are right pins 7 & 8 were reversed on the max232. I have corrected the schematic and uploaded the new zip file.

Thanks
 

pics of 89s51/52 programmer i have done few modifications like pull up resisters in port 1.4 to 1.7 all 1kohm .this is functioning well
 

i am facing the trying to connect to PORT.
it always search for but it doesn't connect to it.
and i have taken 89v51RD2 for master Controller and 89s52 for slave will it work
 

i am facing the trying to connect to PORT.
it always search for but it doesn't connect to it.
and i have taken 89v51RD2 for master Controller and 89s52 for slave will it work

how did you program the code into the 89v51RD2? Is the x2 fuse programmed for standard mode or double clock mode? I'll bet this is your problem. You must program it for standard mode (12 clocks per machine cycle)
 

I have programmed from flash magic with maximum baud rate of 230400
if program is not download correctly then it should doesn't connect to PC by software......... help me i have 89v51RD2 and boot-loader ISPC programmer for RD2 how i can do to it......... to make serial programmer for 89s52 controller
 

I have programmed from flash magic with maximum baud rate of 230400
if program is not download correctly then it should doesn't connect to PC by software......... help me i have 89v51RD2 and boot-loader ISPC programmer for RD2 how i can do to it......... to make serial programmer for 89s52 controller

look at the picture.
 

Attachments

  • FM.jpg
    FM.jpg
    43.9 KB · Views: 388

Hi,
i want to program the AT89s52 controller so i connected the controller with AT89C51 as shown in your diagram and max connections are also given correctly,but the programmer is always saying that "trying to connect COM1" why this is happening i have dumped the given hex file in the 89C51 controller. when i am giving power supply the LED connected to the P1.2 pin is always high is that correct? can you please tell me why my controller is not detecting
 

Hi,
i want to program the AT89s52 controller so i connected the controller with AT89C51 as shown in your diagram and max connections are also given correctly,but the programmer is always saying that "trying to connect COM1" why this is happening i have dumped the given hex file in the 89C51 controller. when i am giving power supply the LED connected to the P1.2 pin is always high is that correct? can you please tell me why my controller is not detecting
you need pull up resistor p1.4 to p1.7 and few further modifications like connect 4 and 6 of serial port and connect 7 and 8 serial port .yes after power supply connection p1.2 is always high that is normal .see my posting above i have done few hardware modification
 

Will the same hex file (EZ_ISP.hex) intended to programme 8051 processor, work for 89s51 also? Then I may programme a 89s51 or 89s52 as the master processor chip with MAX-232.
 

hi i have tried with pull up resistors also but it is always saying that trying to connect com1. what will be the possible reason.
i have used only 2,3 and 5 of serial port i dont know where the other pins need to connect can you please tell me where to connect them how to debug where is the problem
 

Sir, I'm a new member of this forum and a beginner of this programming project. I have a AT89C2051 which i got from a 5.1 sound system. Now i bought a brand new chip from a shop which is blank. So how can i program the new chip by using your programmer??:-?
Anyway, Thanks in advance.
 

I have a AT89C2051 which i got from a 5.1 sound system.Now i bought a brand new chip from a shop which is blank. So how can i program the new chip by using your programmer??:-?
Anyway, Thanks in advance.

bring the code to the shop and ask the person to program it for you. Lots of shops will do this free or for almost no cost to you.

---------- Post added at 16:36 ---------- Previous post was at 16:25 ----------

Hello everyone,
There are always many posts here asking about ISP programmers for the atmel 89S51 or 89S52 mcu's. Most commonly available are the FREE programmers that use the parallel port of your PC.

These programmers are not reliable, or do not work consistently on some parallel ports. If you happened to get stuck with a motherboard on your PC like mine, you would be lucky to get the programmer to read the signature bytes especially with windows XP or higher. These days computers are no longer equipped with a parallel port. I have been using this programmer for a few years now reliably even with a USB to serial adapter cable.

I use the 89S series mcu's quite a bit because they are inexpensive and easy to program (no fuses, or other problems). I wanted an easy to use programmer that would allow me to program the 89S mcu's in circuit without removing it every time.

I did not want to go through all the trouble to write a windows application, so I thought I would just use an existing one and modify the code in the programmer to do ISP operations instead of high voltage parallel programming as in the 89S51/89C52. I chose this one:

**broken link removed**
The ezdl4.exe has nothing to do with me and does not need to be changed to work with this programmer.

The circuit I chose was the same circuit as an avr910 programmer except that an 8051 device is used for the programmer. (the reset circuit will be different and the crystal will be 11.0592MHz) I chose this because I already have an avr910 programmer board therfore I would not have to go through the trouble of making another board.

Have a look at the schematic below. You can use any 8051 mcu for the programmer as long as you adhere to the pinout, and it must hold at least 4K in size. The circuit can take power from your target, or supply power to the target, if the power from the programmer (as with the avr910 programmer) is connected to your target circuit.

Now the only problem is: Somehow you have to get the code into an 8051 MCU. If you do not have a programmer, this will be a problem. Once that is done you will have a very reliable programmer.

Everything is included in the zip file. Please read the readme.txt for instructions.
Any suggestions are welcome. Please post them here.

ctownsend

Corrections to the above post (don't know why I can't edit my own post??)

typos HERE:
I did not want to go through all the trouble to write a windows application, so I thought I would just use an existing one and modify the code in the programmer to do ISP operations instead of high voltage parallel programming as in the 89C51/89C52.

AND HERE:
Have a look at the schematic below. You can use any 8051 mcu for the programmer as long as you adhere to the pinout, and it must be at least 2K in size. The circuit can take power from your target, or supply power to the target, if the power from the programmer (as with the avr910 programmer) is connected to your target circuit.

The original post showed 4K size (that was the original code before the final release)

---------- Post added at 16:44 ---------- Previous post was at 16:36 ----------
hi i have tried with pull up resistors also but it is always saying that trying to connect com1. what will be the possible reason.
i have used only 2,3 and 5 of serial port i dont know where the other pins need to connect can you please tell me where to connect them how to debug where is the problem

help us help you. Show us a schematic of what you've done. what chip are you using for the programmer? what are the capacitors used for the clock circuit? What are the capacitors used for the MAX232 circuit? Are you using a genuine max232?

What does your reset circuit on the microcontroller look like? Did you connect EA to VCC? Are you taking power from the target or supplying power to the target? What voltage?

answer every single question and post a picture of what you've done. this is the only way I or anyone else can offer help to you. The code and circuit does work. I used it for more than 2 years now.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top