1
\$\begingroup\$

I want to program at89s52, and on the internet there are many tutorials on how it is usually done, but almost all of them use the RS232 output from the computer, which I don't have.

The only resource that actually implements it in another manner that I found is the usbasp page. This is something I would by default do, but I would like input from users who have experience programming the 8051 first.

1) Is it possible to implement device programming with an arduino? If so, is it feasible? I'm not entirely familiar with how exactly the SPI programming works, but it is something I am interest in learning. The idea is that I look at the datasheet, find out exactly what needs to be done, and use an SPI library for the arduino.

2) If 1) is too impractical and/or unreliable, should I go ahead and proceed with the USBasp project? I've read somewhere that on newer version of windows, this process is unreliable. So, what are your experiences with USBasp, to those who have done something similar in the past?

3) Any other suggestions or recommendations to upload a program onto the chip?

\$\endgroup\$
  • \$\begingroup\$ Very feasible. Don't know if anyone has actually done it with a AT89XX though. \$\endgroup\$ – Ignacio Vazquez-Abrams Jan 24 '14 at 0:11
  • \$\begingroup\$ The serial programming algorithm is in the datasheet and is straightforward. It would help to have an oscilloscope. \$\endgroup\$ – Spehro Pefhany Jan 24 '14 at 3:05
1
\$\begingroup\$

The AT89S51 is an 8051 architecture microcontroller, not an AVR architecture microcontroller like the Arduino and (as normally expected by) it's ecosystem of programmers.

However

  • The AT89S51 supports serial programming using an SPI interface (MISO,MOSI,SCK,Reset)
  • People claim to have used avrdude (and progasp172) to program an AT89S51 (ref)

If I am right, any Arduino running the ArduinoISP sketch should be usable, in conjunction with avrdude, to program an AT89S51.

Probably not very many people have tried this.

There are numerous inexpensive ISP programmers that are known to avrdude or which emulate a programmer known to avrdude. For example, I've used both an Arduino and a bus-pirate to program a bare ATtiny85 on a breadboard. An unrelated but useful description here

That leaves you with the job of generating a binary file for your target microcontroller.

\$\endgroup\$
  • \$\begingroup\$ He is asking about AT89c51 which is not on ISP but does need a parallel programmer. \$\endgroup\$ – Standard Sandun Jan 24 '14 at 12:25
  • 1
    \$\begingroup\$ @StandardSandun: I'm as certain as I can be (without actually buying one and trying it) that the AT89S51 supports serial programming through an SPI interface. The data sheet mentions it, some blog posts mention it and Google finds programmer circuits that connect to the 89S51 SPI pins. \$\endgroup\$ – RedGrittyBrick Jan 24 '14 at 17:34
-1
\$\begingroup\$

Using an arduino to program AT89S52 Posted: March 21, 2012 in Digital Electronics

https://tiktakx.wordpress.com/tag/programming-8051-using-arduino/

\$\endgroup\$
  • 1
    \$\begingroup\$ Can you include some more information from that blog post here? Link-only answers are discouraged because they become useless if the link dies. \$\endgroup\$ – Nick Alexeev Aug 29 '14 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.