AT89S52 programmer
Because I needed a programmer for the AT89S52 microcontroller I decided to build a very basic one myself. This page should give a quick summary about the outcome of this project. I built this programmer a long time ago in the year 2005, and since then I have used it a lot for firmware development for the AT89S52, and for programming of all my boards using this microcontroller. My goal was never to build a fancy programmer with all the possible functions: all the programmer should be able to do and all it can do is to take a Intel hex file via RS232 interface, and then to program and verify the code byte-by-byte.First I was afraid about the complexity of decoding the Intel-Hex Format, but as it turned out later there was very good documentation about this topic, and I was also able to get it working very quickly. The Intel-Hex Code I used with the programmer until now was only compiled by Keil uVision2 for the AT89S52. That means I can not guarantee right now that this programmer will also work for Hex-Code generated by a different compiler.
Hardware
Power supply of the programmer: not much to say about the simple linear power supply concept. Power is delivered by a small wall power supply, a bridge rectifier and a 7805 regulator make sure that we get the needed +5V supply voltage. The RS232 interface voltage levels are generated by a MAX232 device. The programmer is controlled by the firmware which runs in a AT89S52 microcontroller. The microcontroller is supported by a TL7705 reset controller/brownout detector. A socket for an additional AT24CXX serial I2C eeprom was placed on the PCB, but is not used right now. This eeprom could have been used to remember some settings like baudrate and so on. At the end I have never used this functionality and I set the baudrate for the programming interface to a constant 9600 baud.The diagram below shows the complete schematic of my AT89S52 programmer. By clicking on the schematic it can be seen in full size. After I have tested this configuration I decided to make a PCB design in Eagle. This design was then etched and the circuit was built using through-hole components.
The fully functional PCB and all the needed cables are shown below.