Simple Metal Detectors

USB Programmer for AT89C Microcontrollers Based on Arduino

I’d like to share my latest project — a USB programmer for AT89Cx051/AT89C5x microcontrollers, built on what is probably the most well-known and inexpensive development board out there: the Arduino Nano.

The programmer’s circuit is fairly simple. Besides the Arduino board itself, it contains a couple of transistors, a diode, several resistors and capacitors, a crystal oscillator, and two very popular 74HC595 serial shift register chips.

Circuit diagram

I built the circuit on a breadboard, with separate configurations for microcontrollers in the 20-pin package (AT89C1051/2051/4051) and the 40-pin package (AT89C51/52). For programming the 20-pin microcontrollers, only the upper part of the circuit is needed (without the 74HC595 registers).

The 12-volt supply can be provided either from an external power source or from a boost converter, in which case the programmer can be powered solely through the Arduino board’s USB port (I used one of the cheapest MT3608-based DC-DC converters for testing, and it handled the job perfectly).

The firmware for the Arduino — or more precisely for the ATmega328 — is written in C, so the hex file needs to be flashed using bootloader programs like “Arduino uploader” or similar tools via the standard USB connection. The Arduino’s own bootloader remains intact, so the board can later be reused for any other purpose.

The PC-side software is written in C# and is Windows-only. It has no complicated settings — you just need to select the correct COM port and the microcontroller model you want to program.

I didn’t actually make a physical PCB for the programmer. However, since I drew the schematic in EasyEDA, I generated a possible board layout using the auto-router (I didn’t verify its correctness — it was made just for illustration purposes). The PCB files are attached to the article in the archive. Here’s what the generated programmer board looks like without the DC-DC converter:

The programmer has been tested and verified on the AT89C2051 and AT89C52 microcontrollers. The first one I tested not only with the programmer itself for read/write accuracy, but also in a real device (a clock).

All files (schematic, firmware, software, board layout) are attached to the article. The files will also be available for download on GitHub.

Bill of Materials

DesignatorTypeValueQtyNotesStore
U1Arduino BoardArduino Nano 3.01Search in Otron store
U3-U4Shift RegisterSN74HC5952Search in Otron store
D1Diode1N59181any SchottkySearch in Otron store
R1, R3Resistor1 kΩ2Search in Otron store
R2, R6-R13Resistor10 kΩ9Search in Otron store
R4Resistor4.7 kΩ1Search in Otron store
R5Resistor2.2 kΩ1Search in Otron store
C1Capacitor100 nF1Search in Otron store
C2, C3Capacitor12 pF2Search in Otron store
X1Crystal Oscillator12 MHz1Search in Otron store
Q1Bipolar TransistorBC5471any low-power NPNSearch in Otron store
Q2Bipolar TransistorBC5571any low-power PNPSearch in Otron store

Download files

🔒

This content is available to logged-in users only.

هذا المحتوى متاح فقط للمستخدمين المسجلين.

Ce contenu est réservé aux membres connectés.

🔑 Login 📝 Register

Log in or create a free account to access downloads and exclusive content.

Exit mobile version