1

Since the AT89S52 controller is ISP programmable is it possible to use an Arduino UNO as a programmer to upload the hex file to the 8952 ?

I've tried various programmer softwares such as progisp, 8051 loader and ISP Prog v1.4 but the Arduino doesnt show up as a programmer on any of these. I've uploaded the ArduinoISP sketch on the UNO and then tried to program the 8952 without any luck.

According to my understanding the ISP programmers use an ATMega8 ,so is what I'm trying to do possible or do I need to purchace an ISP programmer ?

2
  • Have you placed a capacitor between ground and reset?
    – Gerben
    Feb 2, 2016 at 19:47
  • Yup, I've tried putting a 10uF cap between the reset an ground of the arduino.
    – SidharthM
    Feb 3, 2016 at 2:35

3 Answers 3

1

You should be able to use the Arduino as an ISP since an ISP is basically just a serial to SPI interface. If you are trying to use the arduino software to upload your program, you will need to edit your boards.txt file to be able to talk to the chip. If you are just using avrdude you will need to update your avrdude.conf. AVR Freaks has a post on someone trying something similar and may be of some help. Without knowing your environment it's difficult to give more specific advice

2
  • I've used keil to get the hex file of a simple blink program written in C. The problem I'm facing is burning this hex file onto the AT89S52. I've tried using progisp, 8051 loader and ISP Prog v1.4 but none of them detect the Uno as a programmer. Also I've uploaded the ArduinoISP sketch onto the Arduino.
    – SidharthM
    Feb 2, 2016 at 18:36
  • You provided information for a) Arduino IDE and b) Avrdude. While accurate and correct, I am looking for a way to use programs like AVRISP, or PROGISP to work with Arduino as ISP. Because they provide easy and graphical interface to a) read HEX and b) program using ISP. Is there any way to use an Arduino Uno programmed with ISP sketch with these software? Sorry for the long comment. Sep 15, 2016 at 22:54
1

You might be able to use the programmer sketch I wrote a while back (it runs on a Uno). You need an SD card interface so it can read the .hex file for programming. See: http://www.gammon.com.au/uploader

You connect things up roughly like this (Atmega328P shown, your wiring would be different at the target chip side):

Chip programmer

You would need to modify the sketch to add the details for the AT89S52. As far as I can make out from the datasheet:

  • Signature: 0x1E 0x52 0x06
  • PROGMEM: 8k bytes
  • RAM: 256 bytes
  • Pinouts: Depending on the chip package. You need to identify MOSI/MISO/SCK/RESET along with Vcc and Gnd.
  • Fuses: None that I can see
  • Flash page size: 256 bytes

Thus you could modify the table of chips to add that one, along these lines:

// see Atmega datasheets
const signatureType signatures [] PROGMEM = 
  {
//     signature        description   flash size   bootloader  flash  fuse
//                                                     size    page    to
//                                                             size   change

  // AT89S52
  { { 0x1E, 0x52, 0x06 }, "AT89S52",   8 * kb,           0,   256,   NO_FUSE },

// ... other ones here ...

I haven't got an AT89S52 to test it on, so I can't say for sure I got those parameters right. I am assuming that the programming instructions for ICSP programming are the same as for the other chips in their range.


1
  • Thank you so much for this brilliant guide! I shall test this today and get back to you with the results!
    – SidharthM
    Feb 3, 2016 at 2:15
-1

If you haven't been successful yet, Try this.(assuming it's still not solved.)

I'm using Arduino to successfully program the AT89S52. Need 2 tools: Arduino program and an AT89S52 programmer software. Here's a complete tutorial on how to do it. Works on Windows, not so sure about linux. http://www.instructables.com/id/ARDUINO-AS-A-8051-PROGRAMMER/?ALLSTEPS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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