Continue to Site

# Can 89S be programmed using USBasp?

Status
Not open for further replies.

#### pranam77

##### Advanced Member level 5
I am using ProgispV1.65 in conjunction with USBasp which is working fine for AVR's. In the device selection list there is an option to choose 89S52. The ISP pins were connected ok and 4, 8 and 12 Mhz crystals were connected and differently tried. Trying to program/ erase the said device gave a "Chip enable program error" message. Has anyone tried this before or is it possible in anyway?

#### nandhu015

##### Advanced Member level 5
progispv1.65

Not possible. Usbasp dont support 89S.
89s52 is in the device list is because the Progisp software is designed to handle a number of hardwares which also supports 89S micros (For example stk500)

Nandhu

### mayela solomon

Points: 2
Helpful Answer Positive Rating

### vardhamanmodi

Points: 2
Helpful Answer Positive Rating

### paolomoi

Points: 2
Helpful Answer Positive Rating

#### kruck

##### Newbie level 1
usbasp

It's possible, but you need to do some change.

There are two main difference between AVR and 89S.

1. The reset signal is inverted.

2. 89S' flash is not paged.

Added after 2 minutes:

By the way, there are already some firmwares on the internet make this change to support 89S.

ETRX_13

### ETRX_13

Points: 2
Helpful Answer Positive Rating
V
Points: 2
Helpful Answer Positive Rating

#### pranam77

##### Advanced Member level 5
chip enable program error

kruck said:
It's possible, but you need to do some change.
There are two main difference between AVR and 89S.
1. The reset signal is inverted.
2. 89S' flash is not paged.
Added after 2 minutes:
By the way, there are already some firmwares on the internet make this change to support 89S.
Thanks Kruck. Can you give me some links to the firmware and the deatils regading how to make the changes?

chalat and Neha007

### Neha007

Points: 2
Helpful Answer Positive Rating

### chalat

Points: 2
Helpful Answer Positive Rating

#### x_dadu

##### Newbie level 3
chip enable program error+progisp

I'm using usbasp too with progisp and I have the same problem, trying to program the 89s52 unsuccesfully... I made this test module and is too bad I can't use it :|...

p.s. this is my first post; just wanna say hi to all, great forum I descover here

### vardhamanmodi

Points: 2
Helpful Answer Positive Rating

### engrksk

Points: 2
Helpful Answer Positive Rating

#### pranam77

##### Advanced Member level 5
test+usbasp

kruck said:
It's possible, but you need to do some change.
There are two main difference between AVR and 89S.
1. The reset signal is inverted.
Will it be possible for the USB handle 89S if the "Reset" logic is inverted by some transistor?

### Neha007

Points: 2
Helpful Answer Positive Rating

### Ogu Reginald

Points: 2
Helpful Answer Positive Rating

### vardhamanmodi

Points: 2
Helpful Answer Positive Rating

#### nandhu015

##### Advanced Member level 5
Can 89S programmed using USBasp?

nop, i tried it but failed.

Nandhu

### Elderfox

Points: 2
Helpful Answer Positive Rating

### vardhamanmodi

Points: 2
Helpful Answer Positive Rating

#### pranam77

##### Advanced Member level 5
Re: chip enable program error

Thanks "Nandhu015" for the Reply. But as per "Kruck"says, it is possible and some firmwares are available for that conversion. You have tried the First point. There is another (Second) point to be noted.
kruck said:
It's possible, but you need to do some change.
There are two main difference between AVR and 89S.
1. The reset signal is inverted.
2. 89S' flash is not paged.
Added after 2 minutes:
By the way, there are already some firmwares on the internet make this change to support 89S.
I was actually expecting a reply from "Kruck" in refernce to his post quoted here. But he has never replied after his first post.

Neha007

### Neha007

Points: 2
Helpful Answer Positive Rating

#### nandhu015

##### Advanced Member level 5
Can 89S programmed using USBasp?

A lot of modifications should be done to program 89S with usbasp. It will become a new project if the modifications are done. More over a new software should be written (PC side) as avr dude does not support 89S

Nandhu

#### pranam77

##### Advanced Member level 5
Can 89S programmed using USBasp?

As i have mentioned in my OP, i use ProgISP and that has 89S in the device list and guess it may have a diffrentt firmware or hardware to make it work. Cheers

### Neha007

Points: 2
Helpful Answer Positive Rating

### hassan sadeq

Points: 2
Helpful Answer Positive Rating

#### nandhu015

##### Advanced Member level 5
Re: progispv1.65

nandhu015 said:
Not possible. Usbasp dont support 89S.
89s52 is in the device list is because the Progisp software is designed to handle a number of hardwares which also supports 89S micros (For example stk500)

Nandhu

As i mentioned earlier progisp software can support development boards such as stk500 which is capable of programming 89S chips. For example, Coding the M8 to support stk500 (including the handling of USB) will be harder than writing a new software that supports 89S chips

Nandhu

Ogu Reginald

### Ogu Reginald

Points: 2
Helpful Answer Positive Rating

#### binu_ji

##### Junior Member level 2
Can 89S programmed using USBasp?

Check here for the changed firmware for atmega8 which can support 89S series micros.
**broken link removed**

### pranam77

Points: 2
Helpful Answer Positive Rating

### Electronics_chaitanya

Points: 2
Helpful Answer Positive Rating

#### pranam77

##### Advanced Member level 5
Re: Can 89S programmed using USBasp?

binu_ji said:
Check here for the changed firmware for atmega8 which can support 89S series micros.
**broken link removed**
Ahhhh...that is wonderful "Binu.Ji". I am truely obliged. It was my oldest dream to constuct one which can program both AVR and 89S. I'll construct it, and post here the results. Too there are many friends on EDA waiting for this. Cheers..

### Neha007

Points: 2
Helpful Answer Positive Rating

### Electronics_chaitanya

Points: 2
Helpful Answer Positive Rating

#### nandhu015

##### Advanced Member level 5
Re: Can 89S programmed using USBasp?

Thanks to Binu ji. It is a wonderful thing iam looking for a long time. Shall i have compiled version of drivers?
Nandhu

#### pranam77

##### Advanced Member level 5
Can 89S programmed using USBasp?

As "nandhu015" mentioned, do we need to compile the driver and use the same? or the one already installed for USBASP will work?
After i programmed the new firmware, i was able to program AVR's but when 89s was tried i got an error message "Chip Enable program error" .
Did you personally try the said project BINU? or may be i am going wrong somewhere. Can you please guide ..?Cheers

Neha007

### Neha007

Points: 2
Helpful Answer Positive Rating

#### joy_shukla

##### Junior Member level 2
Can 89S programmed using USBasp?

i've programmed at89s52 with usbasp .. for that u have to change the firmware of atmega8 ..

the one provided by fischdle ll not work ..

check this one ..

**broken link removed**

Added after 3 minutes:

@pranam77

i advise u to check the connections .. it works with me ..!

#### binu_ji

##### Junior Member level 2
Re: Can 89S programmed using USBasp?

With the changed firmware, you can burn AT89s52 through AVRDUDE.
Add this lines in the text file into the avrdude.conf(\winavr\bin\)

Code:
#------------------------------------------------------------
# AT89S52
#------------------------------------------------------------
part
id               = "8052";
desc             = "AT89S52";
signature        = 0x1E 0x52 0x06;
chip_erase_delay = 20000;
pgm_enable       = "1 0 1 0  1 1 0 0    0 1 0 1  0 0 1 1",
"x x x x  x x x x    x x x x  x x x x";

chip_erase       = "1 0 1 0  1 1 0 0    1 0 0 x  x x x x",
"x x x x  x x x x    x x x x  x x x x";

timeout      = 200;
stabdelay      = 100;
cmdexedelay      = 25;
synchloops      = 32;
bytedelay      = 0;
pollindex      = 3;
pollvalue      = 0x53;
predelay      = 1;
postdelay      = 1;
pollmethod      = 0;

memory "flash"
size            = 8192;
paged           = no;
min_write_delay = 4000;
max_write_delay = 9000;
readback_p1     = 0xff;
readback_p2     = 0xff;
read            = "  0   0   1   0    0   0   0   0",
"  x   x   x a12  a11 a10  a9  a8",
" a7  a6  a5  a4   a3  a2  a1  a0",
"  o   o   o   o    o   o   o   o";

write           = "  0   1   0   0    0   0   0   0",
"  x   x   x a12  a11 a10  a9  a8",
" a7  a6  a5  a4   a3  a2  a1  a0",
"  i   i   i   i    i   i   i   i";
mode      = 0x21;
delay      = 12;
;

memory "signature"
size            = 3;
read            = "0  0  1  0   1  0  0  0   x  x  x  0   0  0 a1 a0",
"0  0  0  0   0  0  0  0   o  o  o  o   o  o  o  o";
;
;
Thanks to joy_shukla for providing the conf text.

#### pranam77

##### Advanced Member level 5
Can 89S programmed using USBasp?

Thanks Joy_shukla and Binu Ji. I'll do the corrections and try again. Cheers

### Neha007

Points: 2
Helpful Answer Positive Rating

### kavuma solomon

Points: 2
Helpful Answer Positive Rating

#### nandhu015

##### Advanced Member level 5
Can 89S programmed using USBasp?

Thanks BinuJi, for your support.

I'll try and come up with the results

Nandhu

#### pranam77

##### Advanced Member level 5
Re: Can 89S programmed using USBasp?

sahil_maratha said:
hello every body...i made a isp programmer with parallel port but it gives me error while writing the flash, it is ok when i read the flash memory.error is write error at memory location 00000002 byte wirtten ..i am using at89c51 program on 89s51 ,,,,should i need to change the program or program for both the controller is same here is my asm program ...please help
The main difference between 89C51 and S51 lies in the following points:

Pin function: Pins almost identical changes were, in the AT89S51 in P1.5, P1.6, P1.7 have a second function, that is, the second 3-pin serial ISP function formed programming interface.

Programmability: AT89C51 only supports parallel programming, But AT89S51 supports both parallel programming and ISP programming.
Voltage in the programming area, AT89C51 in addition to normal programming voltage of 5V, another 12v is needed for Vpp. But AT89S51 just need to be 4-5V.

Endurance: AT89C51 flash memory can be programmed upto 1000 times while the AT89S51 can be programmed from 1000-10000 times, so that the learner repeated the beginning of a more favorable programmer, reducing learning costs.

Frequency: AT89C51 limits the operating frequency is 24MHZ, and AT89S51 maximum operating frequency is 33MHZ, (AT89S51 chip in two models, to support the maximum operating frequency of 24MHZ and 33MHZ) in order to have a faster computing speed.

Power Supply: AT89S51 operating voltage range is up to 4-5.5V, while the AT89C51 at the end of the 4.8V and 5.3V.

Anti-jamming more: AT89S51 has integrated watchdog timer (Watchdog Timer), and AT89C51 needs an external watchdog timer circuit, or single-chip software constitute the internal watchdog timer to achieve anti-jamming software.

If you can program C51 you shud be able to program S51 too . Confirm that all the pins are having good contact with the zif socket or you may consider to constuct USBASP which can program 89S as well AVR's. Cheers

Neha007

### Neha007

Points: 2
Helpful Answer Positive Rating
V
Points: 2
Helpful Answer Positive Rating
Status
Not open for further replies.