Programmer for AT89S2051 etc.

Go To Last Post
79 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I would like to use AT89S2051 processor. Which programmer I can use ? 

USBISP AVR Programmer ? The biggest problem is that this processor has

ISP capability but it is not included in MicrochipStudio.

 

Jerry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but it is not included in MicrochipStudio.

That is for AVR, AVR32 and ARM, not 8051's

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

...AT89S2051...AVR Programmer...

 

The AT89 series is not an AVR.

 

Can I ask, why that chip?

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Great answer.  I am much more clever now :)

 

So, once again. Which cheap programmer I can use to programm AT89S2051 processor ????  :)

 

I hope that there is at least one clever man :)

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why ? it is direct replacement for older AT89C2051 and is also 8051 based aschitecture .. and has ISP capability

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But is NOT an AVR device, so you seem to have lost your way on the journey.

Ross McKenzie, Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

So, once again. Which cheap programmer I can use to programm AT89S2051 processor ????  :)

 

https://www.quaxio.com/programmi...

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

" ... But is NOT an AVR device, so you seem to have lost your way on the journey.... "

 

it was very cruel reply ... I really need help .. :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

woooooooooou finally ..

"https://www.quaxio.com/programmi..."

but there is one small snag .. .I have no Arduino :(

Last Edited: Fri. Feb 4, 2022 - 09:33 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

...but there is one small snag .. .I have no Arduino :(

 

Time to buy one then? They meet your 'cheap' specification.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Arduino costs 36 USD + postal charges ... it is terrible expensive

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


JerryMouse wrote:

Arduino costs 36 USD + postal charges ... it is terrible expensive

 

As you haven't filled in your location in your profile we can only guess where you live but where I am...

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I live in Czech republic. 6.49 Great British Pounds is equal to 194.7 CZK. Postal charge is 12 GBP. 195 + 360 = 555 CZK ....

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

JerryMouse wrote:

I live in Czech republic. 6.49 Great British Pounds is equal to 194.7 CZK. Postal charge is 12 GBP. 195 + 360 = 555 CZK ....

 

Any better? Looking on Aliexpress.

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Surely there are Ebay shops in the Czech Republic.

Or online hobbyist shops.

 

I can buy an Arduino from China very cheap.   I just have to wait for 12-42 days for it to arrive.

Or I can buy from a UK online shop for a higher price.   But it arrives in 1-3 days.

 

I can understand the problem if you lived in Outer Mongolia or remote parts of Africa.

 

Oh,  I think that I wrote firmware for a "USBASP" to program AT89S2051 (some years ago).

But you would still need another programmer to install the firmware.   e.g. an Arduino.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


JerryMouse wrote:
I would like to use AT89S2051 processor.

Why that particular processor?

 

Back in the day, http://www.8052mcu.com would have been the place to ask - but that's now derelict.

 

Might this not be a clue that 8051 might not be the best option to choose ... ?

 

Anyhow, back to the question, the place to start is always the Product Page:

 

https://www.avrfreaks.net/commen...

https://www.avrfreaks.net/commen...

 

In this case:

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes, I live in total backwoods/backwater ... life is cruel ... and as an "almost homelss" it is very difficult to have permanent address

it takes almost 6-9 monts to deliver anything using Aliexpress to our country :( not the 12-42 days

 

 

I can buy Arduino NANO:

https://www.gme.cz/klon-arduino-...

 

can you send me the programm for it ? it is for Arduino a nd for USBASP

I can buy e.g. this:

 

https://www.aliexpress.com/item/...

 

 

on the other hand ... the AT89S2051 has ISP and MicrochipStudio it sholud be capable to programm the AT89S2051 if I add "somehow"  the definition file AT89S2051.xml ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
MicrochipStudio it sholud be capable to programm the AT89S2051

Why "should" it ?

 

You probably could set it up as an "external tool", but you'd still need to find that tool - so why not just use it direct?

 

Even if you got that set up, that's all Microchip Studio would do - it doesn't really seem worthwhile to have to start up MS just to do programming?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

is it too expensive for me .. the bpmmicro.com

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am very very very sad :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

According to this page...

 

https://www.pocketmagic.net/chea...

 

...a USBAsp, when driven by Avrdude, will program the AT89S2051.

 

Job done.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

is it possible to use "Arduio Nano" as the programmer ???

 

https://www.gme.cz/klon-arduino-...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hm this looks hopefuly

https://www.pocketmagic.net/chea...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

According to this page...

 

https://www.pocketmagic.net/chea...

 

...a USBAsp, when driven by Avrdude, will program the AT89S2051.

 

Job done.

 

I am VERY sceptical.   The link quotes AT89S8253, AT89S4051, AT89S2051.   Yet it seems to use the Fischl 2011 firmware.

 

@ JerryMouse ,

 

A Nano can do everything that an Arduino Uno can do.   It just does not have the header sockets to receive Shields.

So you should be able to use the Arduino tutorial from #7.

 

I did not translate your link from #22.  If it is a local Czech shop,   you will receive the item quickly.

 

David.

 

p.s.  I prefer a Uno clone to a Nano clone.    Because I use plug-in Shields for prototyping.

Last Edited: Fri. Feb 4, 2022 - 10:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have got a great idea. :)

Can someone "to create" the programmer with correcponding firware enabling to programm AT89S2051 for me ? and send it to me ?

 

this is good enough

https://www.aliexpress.com/item/...

 

I send money in advance .. .

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As I remember the stk500 can program it, but I'm not sure if the clones can.

 

For sure the older AVR dev. boards could

 

 

Last Edited: Fri. Feb 4, 2022 - 01:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I maybe found the correct programmer and is relatively cheap:

 

https://www.aliexpress.com/item/...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
I would like to use AT89S2051 processor. Which programmer I can use ? 
Is an AT89C2051 close enough?

Paul's Free 8051 Tools, Code and Projects (PJRC)

[bottom]

Atmel 89C2051 in-circuit programmer

via SDCC links page

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

wou ... thanks .....

 

I found another 89Sxxx programmer but it is too expensive for me ... but it looks great

 

https://www.aliexpress.com/item/...

 

www.xgecu.com/MiniPro/TL866II_In...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

No.   The AT89S2051 uses SPI programming.  Like AT89S51 or ATmega8.  AT89C2051 is only parallel.

 

The "difference" is that AT89 chips have an active-high RESET pin.   And an AVR has regular active-low /RESET pin.

 

I don't have an AT89S2051 chip.

 

David.

Last Edited: Fri. Feb 4, 2022 - 03:53 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

The TL866 is quite a useful programmer. If you're going to be doing anything which needs 'odd' chips programming then it's worth having one around.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what do you mean with "odd" ???? it is "queer" ? "old" ?  ok AT89S2051 is not new but is ideal for higt school 1st class students teaching ... (14 years boys and girls)

yes of course ... the the newest AVR or PIC microprocessors provides better technology ... but it is much more complicated

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

To be honest, I'd not be inclined to mess about with gadget from China which may, or may not, work. I'd buy an Arduino, locally if I could, or if you want a reliable supplier from Reichelt across the border in Germany, and use the details on the page I linked to back up there ^^^^

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
AVR ... is much more complicated

I disagree.

 

With its multitude of different address spaces, the 8051 can be confusing for beginners.

 

Beginners also find the pseudo-bidirectional ports confusing.

 

It is really not well-suited to C programming.

 

Very few have on-chip debug.

 

I think something like an ATmega328P/PB would be a far better choice.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I will think about it

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

ok AT89S2051 is not new but is ideal for higt school 1st class students teaching ... (14 years boys and girls)

yes of course ... the the newest AVR or PIC microprocessors provides better technology ... but it is much more complicated

The lack of ADC, internal clock & spi functions, seems a real sad story for students.  The ADC is especially needed for experiments.

Take a look at the mega48...in dip.. so easy to work with., low cost ...has uart too 

 

To be honest, I'd not be inclined to mess about with gadget from China which may, or may not, work. 

It's truly hard to beat the cost of a nano board for around a dollar....order 100 of them....any that don't work or get blown up by students, just hit the trashcan.  You can do plenty of experiments with them.

They can still program in assembler & learn all about the AVR.

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Fri. Feb 4, 2022 - 05:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

YES !!! ... I know   STM32 or AVR are significantly better microprocessors ...

and I do not think that everything from China/Aliexpress is Shit ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
and I do not think that everything from China/Aliexpress is Shit ...

 

You have more lessons to learn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I do not live in such advanced and rich country as England is .... I live in total backwater ... everything is different in here ... and I am almost homeless so my look on world is somewhat "different" ..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try to ask Zuzana Vesela, school teacher in Olomouc (https://www.spseol.cz/). She had documentation how to made programmer for C2051 and if i remember correctly also for S2051.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
I live in total backwater ... everything is different in here ... and I am almost homeless so my look on world is somewhat "different" ..

Learn to see problems (such as yours) as something that needs a solution, find others like your self (form a club) that enjoy programming, pool resources, buy in bulk and sell to others in the club and surrounding areas.  By helping others, you help your self, bring joy to many around you, and improve your life at the same time...  

Good luck with your programming and with helping others!

 

Jim

 

 

FF = PI > S.E.T

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

JerryMouse wrote:

I found this:

https://www.rathlev-home.de/mc/m...

 

That could be worth exploring. 

It has a ISP program that the docs say maps like this  - it needs a USB-Serial 5V adaptor, which you hopefully already have.

 

( SCH has DTR - RST, or that can be manually held hi during PGM I think )

 

So you could connect a AT89S2051/AT89S4051, and see how far you get ?  

That will not be fast, as it just wiggles serial lines ( ie - a bit slow on FS-USB UART bridges, a little faster on HS-USB Bridges.)

 

It should be able to read SIG bytes of AT89S2051/4051  - you could contact the author, with your progress test results ?

 

There is chatter about AT89S support via AVRDUDE, and it seems it was added  (some comments about needed reset polarity choice, but it also seems you can manually hold RST HI during pgm  ?) 

PC control is nice to have, as you can code/download/run faster. 

 

This page 

http://www.8051projects.info/res...

 

mentions 

You can program the following 89 series chips by using this programmer AT89S51, AT89S52, AT89S53, AT89S8252, AT89S8253, AT89S2051, AT89S4051 and AVR chips

and it appends avrdude.conf by If you want to program 89S52 with AVR dude then Add this text into your avrdude.conf(\winavr\bin\) my_conf.txt

- but that's behind a log-in wall.

 

This page has a avrdude config file stub for AT89S8253, which covers the bulk of the work, and it looks to have the same 4 byte SPI as AT89S2051/4051

 

https://www.edaboard.com/threads...

Included on that page is if you have (ancient) PC's there with Standard parallel ports, it can also add the Parallel port mapping for Atmel at89isp cable.. What do your students use ?  

 

Sig bytes are AT89S2051: Address 00H = 1EH 01H = 23H 02H = FFH  AT89S4051: Address 00H = 1EH 01H = 43H 02H = FFH  whilst AT89S8253 above says    readback_p1     = 0x1E;  readback_p2     = 0x73; 

First 0x1e is Atmel and second byte is device ID.

 

 

There is also chatter here on AT89S parts via avrdude - some caveats, but the 4-byte ones seem ok ?

https://www.avrfreaks.net/commen...

 

and another example here, seems to have 3 config appends  AT89S51 AT89S52 AT89S8253

 

https://www.avrfreaks.net/commen...

 

and another useful comment

https://www.avrfreaks.net/commen...

 

and even better seems to be 

https://www.avrfreaks.net/commen...

That has a .ZIP file with 7 AT89S/AT89LP parts and (IIRC) an usbasp firmware update that adds autodetect of reset polarity, to make things cleaner. Or I guess you could add a HW inverter ... 

To use the firmware update, you would need to buy multiple usbasp's  but you may already be doing that for the students ?

 

 

Last Edited: Fri. Feb 4, 2022 - 11:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

I have got a great idea. :)

Can someone "to create" the programmer with correcponding firware enabling to programm AT89S2051 for me ? and send it to me ?

 

this is good enough

https://www.aliexpress.com/item/...

I send money in advance .. .

See #44  - for students I would like the aluminum case ISP, I think that cover comes off easily so you can upgrade the firmware ( 2 uspisp needed) 

 

Addit: Some notes on repgm of the aluminum case models here, https://github.com/aleh/usbispand here  https://www.sciencetronics.com/g..., seems they are not exact clones, so the 89S51 auto-reset-polarity firmware linked above, (https://www.avrfreaks.net/commen...)  might not work out of the box ?

 

If you have shiploads of disposable AT89S2051 (DIP?), you can teach a lot using those. Especially using the simulator you found in #31

 

For more advanced students, you could get this I think in CZ for about USD10 ?  - that's a '2022 version of 89S2051' :)   1.8~5V 50MHz ADC DAC PWM SPI i2c UART (but no DIP)

https://cz.mouser.com/ProductDet...

 

Last Edited: Sat. Feb 5, 2022 - 01:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


The STK500 (which you don't have.....) and the older Studio 4.18 can do AT89S51 and AT89S52, there is also and entry on the STK500 manual on how to do it.

 

 

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I suggest that you do not spend any more time and money on this 89S2051 microcontroller that you have found.

 

This processor has not been used in new designs for about 25 years.  It belongs in a museum.

 

   But in the real world, your chances of getting this device to do anything useful are about as good as your chances of winning a million dollar lottery.  The tools and development programs are all 30 years old and are very unlikely to work correctly on modern versions of Windows.   It will take hundreds of hours of study and experiment to learn the assembly language that this ancient 2K-byte chip uses.  It would be like learning a language spoken by a few hundred people instead of learning English or Chinese that is spoken by millions of people.

 

There are a lot of older people on this website who actually did write code for this CPU for a living a long long time ago.  They will tell you what programs and development environments that they used 30 years ago.  They could, with a well-equipped electronics lab and their combined hundreds of years of experience, get this silly thing to do some demo program like blinking an LED or writing "hello world" to a serial terminal.  And then they would tell you that you could do it as well.   But that is not true: and they are being disingenuous.  They are not exactly lying: but they are not telling you the real-world truth.   Which is that if you are near-homeless, then you should spend your time and money on dealing with that situation, instead of wasting time and money on a piece of obsolete technology.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, 8051/52 is almost 45 years old technology, but it is still in production. there is a lot of manufacturers producing this "old" technology ..

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Simonetta wrote:

I suggest that you do not spend any more time and money on this 89S2051 microcontroller that you have found...This processor has not been used in new designs for about 25 years.  It belongs in a museum.

 

You couldn't be more wrong. That chip is a '51 family chip; an architecture that is alive and well, and being designed into new products as we type.

 

There are modern compilers and development tools for it from numerous sources. The instruction set is simple and easy to learn; much simpler and easier than an AVR. The web is full of example code.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

ok, 8051/52 is almost 45 years old technology, but it is still in production. there is a lot of manufacturers producing this "old" technology ..

 

Yes, the 8051 is very widely used in Asia, and even in USA Silabs has new releases in the 50MHz 1T models EFM8BB52, 1.8~5.5V with 12b ADC and 10b DAC, that's actively being designed in, in 2022.

 

If your students want to also build something, as part of their learning, search Aliexpress for Digital clock DIY or similar.

There, you will find many low cost kits, most of them based on 8051 DIP controllers (Atmel AT89, STC STC15 ) 

 

Addit : Discussions and notes on variants on these kits are around. This link discusses a temperature sensor upgrade, so the revised PCB flipped the last 2 digits, to allow 'C  

https://github.com/zerog2k/stc_d...

 

Addit : more discussions and code

https://github.com/aFewBits/stc-...

 

and a Python STC downloader, (for ROM bootloader models) so you can also show students that source code.

https://github.com/grigorig/stcgal

 

Addit: Also cheap is the STC89C52RC, some DIP40 LED-kits, and a low cost SMD breakout with USB loader included is here https://www.aliexpress.com/item/...

Another part number to search, is the STC12C2052AD, similar LED kits, like here 

https://www.aliexpress.com/item/... - same pin/package as AT89S2051, but faster & with ADC/SPI/PWM/EEPROM

You can buy DIP STC12C2052AD as 'spares', but if doing that you may prefer to option-up to the same pinout more flash/ram/pca   DIP20 https://www.aliexpress.com/item/... STC12C5616AD-35I-PDIP20   US$8.91/10

 

 

The 'Rotating LED' kit models seem to all use DIP STC15W408, and include a re-program connector, making it easy to change what the LEDs do.

Data is here : http://www.stcmcudata.com/datash...

I see a couple use AT89S52 (DIP40) , and another has a pre-mounted SMD STC MCU  - so, you have plenty to choose from :) 

Last Edited: Sun. Feb 6, 2022 - 08:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are several 8051 development boards or kits from China.

 

But think about what projects your students might want to learn e.g.

UART

PWM

ADC

I2C

SPI

LEDs

16x2 LCD

128x64 Graphics LCD

...

 

They can all be done with a modern 8051.   But you may need extra parts like programmer, RS232 cable, external modules, ...

 

When you start to think about it,   a ready-made Arduino Uno, Nano is cheap and attractive.   i.e. one USB cable connects to student's PC.

Likewise an XMINI or Curiosity board for AVR.

 

Or if you really want 8051,   a Silabs evaluation board.

 

Arduino might be the best choice for student "enthusiasm".   But you will probably "lose" a lot of hardware boards.

 

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
Yes, the 8051 is very widely used in Asia,
Some USB 8051 by ones at WCH are of note.

Who-me wrote:
 and even in USA Silabs ...
and Infineon acquired Cypress Semiconductor

 


WCH MCS-51(8051) USB MCUs | AVR Freaks

 

GitHub - djmuhlestein/fx2lib: Library routines for creating firmware for the Cypress FX2 (CY7C68013 and variants) with SDCC

EZ-USB™ FX2LP - Infineon Technologies

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I decided to buy this:

https://www.aliexpress.com/item/...

it is cheap and supports AT89S2051

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

I would like to use AT89S2051 processor. Which programmer I can use ? 

USBISP AVR Programmer ?

Beside offline books,Here's the basic starter webpages for 51/52 families.

https://www.kswichit.com/

 

Brian Fairchild wrote:

According to this page...

 

https://www.pocketmagic.net/chea...

 

...a USBAsp, when driven by Avrdude, will program the AT89S2051.

 

Job done.

 

Just added the scripts ,like :

https://www.avrfreaks.net/commen...

Since S2051 then yes,work with AVRdude if you bought the:

https://www.pocketmagic.net/chea...

It works when I used in the past.Right know I'm building the Parallel programmer that work's for C 51/52,etc families.

 

Who-me wrote:

JerryMouse wrote:

 

I found this:

https://www.rathlev-home.de/mc/m...

 

 

 

That could be worth exploring. 

It has a ISP program that the docs say maps like this  - it needs a USB-Serial 5V adaptor, which you hopefully already have.

 

( SCH has DTR - RST, or that can be manually held hi during PGM I think )

 

So you could connect a AT89S2051/AT89S4051, and see how far you get ?  

That will not be fast, as it just wiggles serial lines ( ie - a bit slow on FS-USB UART bridges, a little faster on HS-USB Bridges.)

 

It should be able to read SIG bytes of AT89S2051/4051  - you could contact the author, with your progress test results ?

 

There is chatter about AT89S support via AVRDUDE, and it seems it was added  (some comments about needed reset polarity choice, but it also seems you can manually hold RST HI during pgm  ?) 

PC control is nice to have, as you can code/download/run faster. 

 

It also work with USB to serial,this way without change the avrdude.conf file cause the scripts already there.

 

Simonetta wrote:
This processor has not been used in new designs for about 25 years.  It belongs in a museum.

 

JerryMouse wrote:
ok, 8051/52 is almost 45 years old technology, but it is still in production. there is a lot of manufacturers producing this "old" technology ..

 

Nop,Still in producing.The AT89S very available at third countries.

C51 cost around 0.45 US$ in C2051SI,meanwhile S2051-PI around 1 US$.So yes,economical for Third countries.

 

Who-me wrote:

If your students want to also build something, as part of their learning, search Aliexpress for Digital clock DIY or similar.

There, you will find many low cost kits, most of them based on 8051 DIP controllers (Atmel AT89, STC STC15 ) 

 

A lot of projects could be used basically 8051 processosr.Such as Modbus slaves,GPS to GSM tracker,SMS sensors notification,Packet radio modem,also Internet Web sensors,etc

The last two already experimented at Czech republic.

 

gchapman wrote:

Who-me wrote:

Yes, the 8051 is very widely used in Asia,

Some USB 8051 by ones at WCH are of note.

 

 

Who-me wrote:

 and even in USA Silabs ...

and Infineon acquired Cypress Semiconductor

yes

 

JerryMouse wrote:

I decided to buy this:

https://www.aliexpress.com/item/...

it is cheap and supports AT89S2051

So,you must added scripts at Avrdude.conf to support the S2051.

 

JerryMouse wrote:

The biggest problem is that this processor has

ISP capability but it is not included in MicrochipStudio.

  AVRdude with MPLABX https://gallery.microchip.com/pa...

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

Last Edited: Mon. Feb 7, 2022 - 12:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
if you really want 8051,   a Silabs evaluation board

+1

 

SiLabs parts have on-chip debug.

 

Also (last time I looked) SiLabs give you a free full Keil licence for use on their chips.

 

And they have active forums.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How can I add  Avrdude.conf  ??? From where I can download it ?

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Silabs looks nice but very expensive

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
How can I add  Avrdude.conf  ??? From where I can download it ?

 

https://www.nongnu.org/avrdude/

 

 

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

  AVRdude with MPLABX https://gallery.microchip.com/pa...  

 

I can not download it ... maybe there is a problem ... :(

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

test

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

wooooou "download" button :) :) :) :)  and is working :) :) :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

How can I add  Avrdude.conf  ??? From where I can download it ?

Check when your programmer arrives if it has links to a CONF file.  Hopefully, they deliver what they claim :) 

 

Otherwise, you need to append the standard AVR conf, with AT89 chip infos,  or probably better, create a new conf file you specify on the command line - that way avrdude updates do not erase your AT89 info

 

See my post #44 that links this file

 

https://www.avrfreaks.net/sites/...

 

that file avrdude.AT89 is a new conf file for avrdude, & has  these parts defined

    desc             = "AT89S51";
    desc             = "AT89S52";
    desc             = "AT89S53";
    desc             = "AT89S8252";
    desc             = "AT89S8253";
    desc             = "AT89S4052";  << typo, they really meant AT89S4051 ?
    desc             = "AT89LP4052";    
with the AT89S4051 info, you can create a new AT89S2051 entry 

AT89S4051: Address 00H = 1EH 01H = 43H 02H = FFH  size            = 4096;  << defined now, 4k,  1EH 43H 

AT89S2051: Address 00H = 1EH 01H = 23H 02H = FFH  size            = 2048;  << you need to add, by copy 4051 and edit Sig and Size.

 

called like this  

avrdude -c usbasp -C avrdude.AT89 -p AT89S52 -B4
Last Edited: Mon. Feb 7, 2022 - 08:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, thanks. It will take many monts to deliver the programmer from China to my country. I guess .. .maybe May/June :)

Once, the programmer will be delivered, I try it.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

ok, thanks. It will take many monts to deliver the programmer from China to my country. I guess .. .maybe May/June :)

Once, the programmer will be delivered, I try it.

You can (hopefully) try things right away, once you have avrdue and an AT89 config file, as some of the avrdude programmer options are like this 

Valid programmers are:
  c2n232i          = serial port banging, reset=dtr sck=!rts mosi=!txd miso=!cts
  dasa             = serial port banging, reset=rts sck=dtr mosi=txd miso=cts
  dasa3            = serial port banging, reset=!dtr sck=rts mosi=txd miso=cts
  ponyser          = design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts

Those connects UART data and handshake lines, (I've not tested this on USB-UARTS, but hopefully they have **)  and will be v-e-r-y s-l-o-w, but does allow you to download led flashing routines etc to confirm everything works :)  

 

**Addit: Ah, I find this pdf https://www.hackerschicken.eu/ww...

It says dasa3 option works, with USB-UART, and gives waveforms and times  "The programming and verification take one minute for 114 bytes in a tiny13A" 

Notice in the dasa3 SCH, the pdf shows SCK = RTS (pin 7, connected to pin 6 DSR)  and I think that read-back is important.

If you have a TTL level cable those can invert.

 

When I've tried pin-wiggling on USB-UARTS, it is best to send-then-check with a physical readback, as the long buffering in modern OS and USB take varying times. Hopefully, avrdude is doing that ?

 

The avrdude.conf has this info, so it looks like you might be able to flip any pin with a prefix ~, to match TTL/Clamped232/Reset polarity of AT89, and it seems command line can also (re) define and flip pins ?  ***

 

A scope should make this quick.

programmer
  id    = "ponyser";
  desc  = "design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts";
  type  = "serbb";
  connection_type = serial;
  reset = ~3;
  sck   = 7;
  mosi  = 4;
  miso  = 8;
;

programmer
  id    = "dasa3";
  desc  = "serial port banging, reset=!dtr sck=rts mosi=txd miso=cts";
  type  = "serbb";
  connection_type = serial;
  reset = ~4;
  sck   = 7;
  mosi  = 3;
  miso  = 8;
;

Addit ***: I find this https://learn.adafruit.com/ftdi-...

and that confirms editing ~ prefix settings for a TTL-RS232 ( so all pins flipped to compensate for no RS232 level inverters), for AVR;  For AT89 you would use reset = 4;

Their screenshots confirm roughly 100 seconds per kilobyte write speed (on AVR) - good enough for proof of hardware, and enough for anyone in a real jam, but not something you'd pick as a first choice :)

You can do something educationally useful in 12 bytes 

 

#
programmer
  id    = "ftdifriend";
  desc  = "design ftdi adatper, reset=dtr sck=tx mosi=rts miso=cts";
  type  = serbb;
  reset = ~4;
  sck   = ~3;
  mosi  = ~7;
  miso  = ~8;

 

Last Edited: Mon. Feb 7, 2022 - 10:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As long as with S chips.Which mean ISP capability.Then programmer only need MISO,MOSI,Reset,SCK.

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok, I will try it but I have nothing right now. No USB-RS232 cable ... nothing.

I sent the order for AVRISP programmer:

 

https://www.aliexpress.com/item/...

 

and also other things but several of the orders were not sent because of the manufacturers/sellers "malfunction".

The programmer I ordered is probably NOT capable to operate together with AVRDude, but I have PROGISP 1.72.

 

On the other hand, the programmer can be re-programmed with USBasp ThomasFischl source code inhere:

https://www.fischl.de/usbasp/#ga...

 

so in the worst case I will reprogramm it. It means that I will probably need one more programmer :) :) :) :)  it is nice ..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I had that in the past.And worked with AT89S51 and AT89S52 via AVRdude.

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How's with anothers(S51/S53/else)...?

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";
      ;
  ;

 

Yes. All you do for the AT89S51 entry in the avrdude.conf is 

part
    id               = "8051";
    desc             = "AT89S51";
    signature        = 0x1E 0x51 0x06;
...
    memory "flash"
        size            = 4096;
...
        read            = "  0   0   1   0    0   0   0   0",
                          "  x   x   x   x  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   x  a11 a10  a9  a8",
                          " a7  a6  a5  a4   a3  a2  a1  a0",
                          "  i   i   i   i    i   i   i   i";
...

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

Last Edited: Thu. Feb 10, 2022 - 01:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am afraid that I do NOT understand. It is part of AVRDUDE.conf file ??? So, can you send me

complette config file containing infos for ALL microprocessors including AT89S2051 etc.

Not only scraps ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:
I am afraid that I do NOT understand. It is part of AVRDUDE.conf file ???
 Just download the AVRdude then Added that script to AVRdude.Conf. Or WinAVR which already bundled with AVRdude.I never had S2051 only C2051 which programmed with Sistudio DOS parallel port programmer.Cause the price for S2051 similiar to S52/S1 but had more memories and pins.

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

Last Edited: Thu. Feb 10, 2022 - 01:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ok

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

by the way I noticed dtaha there is NO support for AT89S2051 in the AVRdude.Conf file

https://github.com/arduino/ardui...

 

have you config data for AT89S2051 ???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

JerryMouse wrote:

by the way I noticed dtaha there is NO support for AT89S2051 in the AVRdude.Conf file

https://github.com/arduino/ardui...

Just edit the script for AVRdude.conf for S2051...I never used S2051 only C2051 with SIstudio DOS that I mention earlier.#71

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

JerryMouse wrote:

I am afraid that I do NOT understand. It is part of AVRDUDE.conf file ??? So, can you send me

complette config file containing infos for ALL microprocessors including AT89S2051 etc.

Not only scraps ...

You do not have to edit avrdude.conf, you can better place conf info into a separate file and command line point to that ( -C AT89S_AT89LP_avrdude.conf )

If you edit avrdude.conf, and then later update avrdude, oops, your edits are overwritten - better to have a batch file + conf you simply give to anyone who already has avrdude. 

 

I linked above to a CONF file that has AT89S4051  which is the sibling part to AT89S2051, so needs minimal edits (2 places I think, sigbyte ID and code size ) 

Attached is that file renamed to an obvious-name AT89S_AT89LP_avrdude.conf and edited.  ( Someone else may have already a proven/tested AT89S2051 conf ? )

 

JerryMouse wrote:

by the way I noticed dtaha there is NO support for AT89S2051 in the AVRdude.Conf file

https://github.com/arduino/ardui...

Correct, see above, That is why you are best to use a new, separate conf file for AT89S_AT89LP

Attachment(s): 

Last Edited: Thu. Feb 10, 2022 - 08:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could used MPLAB X-IDE 6 with another AVR chips and AVRdude(Beside Atmel Studio) https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs 

www.tokopedia.com/madagang .Buy and Donated cheap electronics and manuscripts.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would like to conclude my many weeks/months long effort to find suitable and cheap programmer for AT89S2051.
There is my story:

 

1/ I selected apparently easy way - I ordered USBASP programmer from Aliexpress + 2 pieces of AT89S2051 + crystal 16MHz
+ small PCB 7x5cm with holes + connectors + ZIF socket etc.
After 8 weeks waiting I received the programmer - blue printed circuit board. :) ghastly sexy.

 

2/ I created my own simple DEV board using the components from Aliexpress.

 

3/ I installed driver for USBASP programmer using Zadig software (https://zadig.akeo.ie/) I found on internet.
I downloaded recommended ProgISP 1.72 and I run it. I connected all together i.e. USBASP + DevBoard + AT89S2051 inside it.

 

4/ And ..... BIG disappointment appeared :) Unfortunately, the ProgISP announced an ERROR - no programmer found.
I received identical errors from AvrDude, eXtremeBurner and many other programming software.
I set to re-test everything ... many times ... and .. finally I was totaly frustrated and desperate.
So, I tried to find a help on AvrFreaks but ... almost nothing ... one respondent offered me a personal help ...
I ordered another USBASP programmer from Aliexpress, but this programmer burned out when I pushed it into USB port - probably
deffective piece.

 

5/ ... after 12 weeks of total "system" frustration .... :) and flaming communication with Aliexpress sellers and AvrFreaks and
with the regular brick from AvrFreaks ... I finally saw the ligth at the end of the dark-tunel ...

 

6/ The regular brick sent me his own 10 years old USBASP programmer + firware (firmware_kbv.hex). Hurey !!! The programmer works !!! :)
Using this programmer and firmware which he sent me (firmware_kbv.hex) I re-programmed the USBASP programmer from Aliexpress using
ProgISP 1.72 and ... wiola ! the USBASP programmer from Aliexpress set to work properly. This means that some (maybe ALL) Aliexpress
sellers selling the USBASP programmers with WRONG and functionless firmware ... maybe yes, maybe no... There is NO way how to use the
single programmer from Aliexpress because it is hardware with functionless firmware. Several Aliexpress sellers sent me BaiduDISK package
for Windows, but everything was in Chinese and I do not speak Chinese - biggest problem. It means that someone (3rd person) has to help. Maybe Arduino
can help, but I did not test it.  Of course, there are many commercial programmers which work perfectly, but many times more expensive.
The chiepest is microe.com - only 69USD + postal charge.
I thought, that if the USBASP programmer has USB connector + Bootloader and ISP capability it can be ITSELF programmed using bootloader
via USB and a writer program (avrdude) under windows/linux, but it is NOT true :(. I need a programmer (or arduino) to programm the USBASP
programmer. it is really very complicated. Yes, there is the fisch.de, but it is, indeed, not possible to order the USBASP programmer.

 

7/ So, I decided tu put on public some useful sw + info which I found on internet, maybe this will help to someone:

 

https://uloz.to/file/E1eiFRAK0Ia...
https://ulozto.net/fm#/detail/xF...

or

https://uloz.to/file/KyxAKOIsGOr...
https://ulozto.net/fm#/my-files/...

 

Content of the rar file: Once a man has fully working USBASP programmer, the recipe "how to" is simple: insert USBASP into USB port of a computer (with e.g. windows)
and run Zadig and select menu Options / ListAllDevices and select USBASP + install driver. E.g. libusbK works for me. For AvrDude there is an avrdude
config file with necessary AT89S2051 definitions +  Microchip Assembler 8051 + AvrDude + AvrDudes (recompiled for W10.NET4.8) + ProgISP 1.72 + many others.
The biggest problem is that a man needs "a programmer" to re-programm the functionless USBASP programmer from Aliexpress.
It is really biggest iffy problem ever. On the other hand, once in far future the Alixpress sellers will understand ....  

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Most people here would say "use an AVR because they are easy to work with" (this is, after all, an AVR support board!)