user7193: 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 ? 

user16679: 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

user10794: 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):

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.


Sketch source: https://github.com/nickgammon/arduino_sketches


7193: <p>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 ? </p>

<p>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. </p>

<p>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 ? </p>
 16679: <p>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.  <a href="http://www.avrfreaks.net/forum/writing-at89s52-through-usbasp" rel="nofollow">AVR Freaks</a> 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</p>
 10794: <p>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: <a href="http://www.gammon.com.au/uploader" rel="nofollow noreferrer">http://www.gammon.com.au/uploader</a></p>

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

<p><a href="https://i.stack.imgur.com/tscQr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tscQr.jpg" alt="Chip programmer"></a></p>

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

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

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



<pre class="lang-C++ prettyprint-override"><code>// 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 ...
</code></pre>

<p>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.</p>

<hr>

<ul>
<li>Sketch source: <a href="https://github.com/nickgammon/arduino_sketches" rel="nofollow noreferrer">https://github.com/nickgammon/arduino_sketches</a></li>
</ul>
