18 thoughts on “An Arduino-based programmer for the AT89C2051 chip – part 2”

  1. Hi.
    I need a flash AT89C2051 controller for the stereo system. I want to repeat your programmer. Tell me, please, can I replace the transistor BC337 to transistor BC817?

    thanks!
    regard, B

    1. Hi borya

      Yes, the BC817 will work well. You can use any general purpose NPN transistors for this project.

    1. Hi natraj,

      There is a link to download the source code on the page ‘POV source code – part 2’. Here’s a copy of the link:

      http://ceptimus.co.uk/POVclockMain.c

      If you click on that it might just display the source in a window, but you should be able to right-click and ‘save as…’

      All the source is in that one file.

      The YouTube video shows how to connect the Arduino: https://youtu.be/Xy8lKjUCEk8

      Look in the description of that video and there are some links to download the Arduino sketch.

  2. Cant make this work reliably. I can read and i can erase “sometimes” but not always. I cannot read signature, i cannot program the chip. The PC program seems quite flaky.

    1. Have you measured the voltages produced by the charge pump and the zenner / transistor circuit? Mine seems to work 100% reliable – sorry that you’re having problems with your version.

  3. I do use external 12V source. I do manually switch from 12V to 5V and back. Only 2 resistor and 1 transistor. The hardware works, i can program the chip.

    I did simplyfy the code and send commands / data with a terminal program now. This works reliably. I use hex2bin to convert the hex to binary, then hterm “send file” to upload the data.

    I think the PC app has some problems.

  4. Hi, ceptimus!
    I assembled the programmer according to Your circuit. It seems to be working. I can read the signatures, I can read the controller’s memory (but it’s empty). When I try to download the firmware into the program, I get an error “Line 1 of file does not start with a colon”.
    Can You help me?

    1. I think the problem is one hundred firmware in the BIN format. I downloaded the converter, converted it to HEX. Uploaded it to the program. But got the error “hex file extends beyond memory size (2048 bytes)”
      Took another file that weighs 2kB, first was 3kB. converted it to HEX, uploaded to the program. good, there is no error.
      Write it to the chip. Then I read the chip. And I see discrepancies. The FF structures are listed as 7F, there are still discrepancies. Tell me, what’s wrong? Where I was mistaken?

    1. Hi borya,

      If something is being written to the chip, but some bits are missing (e.g. 7F instead of FF), then I would first check the programming voltage while the chip is being programmed. Do you have a voltmeter? The circuit has to provide 5V and 0V to the chip when it is being read normally – and then 12V while programming. The diode capacitor circuit driven by the two Arduino pins should generate more than that – maybe 15V or so – as long as it’s more than 12V that’s fine as the zener diode then regulates it down to 12V. Try to erase the chip back to blank (or use another one if you have one) and try again. If you want to email me the two files, I can try to compare them and see if I can work out what might be going wrong. You can email to ceptimus@ceptimus.co.uk

      If it’s not the programming voltage, another problem might be a bad connection or short on the pins connecting from the twin row of I/O on the Arduino Mega to the pins on the chip. If you disconnect your board from the Arduino and also remove the chip from the programming socket, then you should carefully check that all the connections are as they should be and you don’t have any accidental shorts between adjacent pins.

    1. Yes, I’ll try. Do you have any sort of oscilloscope available? Or maybe a multimeter that can show frequency as well as volts, etc.?

Leave a Reply

Your email address will not be published. Required fields are marked *