Uploaded February 2025 | Updated November 2026, 3 hours ago
The usual way of programming an AT89S52 (or 51), with an Arduino, is to use the "ArduinoISP" sketch (available in the Arduino IDE Examples folder) and then the AVRDUDE program with a customized avrdude.conf configuration to transfer the Intel hex file to the Arduino, and so, via the SPI connection to the target chip.
This works well enough, and is fine if you only want to program one or two chips. But if you're developing code, and repeatedly flashing a chip to try things out, it's very slow: the time taken to upload 4 K bytes to the target chip flash memory is ninety seconds or more. Plus, you have the hassle of setting up the custom avrdude.conf file.
The code I've written, just receives the original Intel hex file to the Arduino, which then programs the target chip flash memory. It transfers the same 4 K bytes of flash to the target chip in about four seconds, so it's over twenty times faster.
The version demoed here needs a lot of memory in the Arduino, as that memory holds the full contents of the Intel Hex file, along with a memory image of the data to be programmed to the target chip. My Arduino Mega is fitted with a 512 K byte SRAM expansion (though this sketch only uses about 24 K bytes).
I realize that most people don't have a 5-volt Arduino, that has sufficient SRAM, so I'm working on a modified version that should work on a standard, old school, Arduino Uno or Nano. It should work almost as fast. I'll make a full length video about it, explaining connections, operation, and with the files available for download, once it's debugged and working.
The usual way of programming an AT89S52 (or 51), with an Arduino, is to use the "ArduinoISP" sketch (available in the Arduino IDE Examples folder) and then the AVRDUDE program with a customized avrdude.conf configuration to transfer the Intel hex file to the Arduino, and so, via the SPI connection to the target chip.
This works well enough, and is fine if you only want to program one or two chips. But if you're developing code, and repeatedly flashing a chip to try things out, it's very slow: the time taken to upload 4 K bytes to the target chip flash memory is ninety seconds or more. Plus, you have the hassle of setting up the custom avrdude.conf file.
The code I've written, just receives the original Intel hex file to the Arduino, which then programs the target chip flash memory. It transfers the same 4 K bytes of flash to the target chip in about four seconds, so it's over twenty times faster.
The version demoed here needs a lot of memory in the Arduino, as that memory holds the full contents of the Intel Hex file, along with a memory image of the data to be programmed to the target chip. My Arduino Mega is fitted with a 512 K byte SRAM expansion (though this sketch only uses about 24 K bytes).
I realize that most people don't have a 5-volt Arduino, that has sufficient SRAM, so I'm working on a modified version that should work on a standard, old school, Arduino Uno or Nano. It should work almost as fast. I'll make a full length video about it, explaining connections, operation, and with the files available for download, once it's debugged and working.










