• Simple Serial Programmer Circuit For At89c2051 At89c51

    From Cary Kool@21:1/5 to All on Sat Nov 25 16:59:27 2023
    How to Build a Simple Serial Programmer Circuit for AT89C2051 and AT89C51 Microcontrollers

    If you are looking for a cheap and easy way to program your 8051-compatible microcontrollers, such as AT89C2051 and AT89C51, you might want to try this simple serial programmer circuit. It uses an Arduino UNO as the interface between your PC and the
    microcontroller, and an optocoupler to isolate the high-voltage programming signals. You will also need a ZIF socket, a crystal oscillator, some capacitors, resistors, diodes and transistors. In this article, we will show you how to build the circuit,
    install the software and upload your code to the microcontroller.


    Building the Programmer Circuit

    The programmer circuit consists of two parts: the H-bridge and the power switch/oscillator. The H-bridge is used to control the 12V supply to the microcontroller's reset pin, which is required for programming mode. The power switch/oscillator is used to
    turn on and off the 5V supply and the crystal oscillator for the microcontroller. The schematic and pictures of the assembled board are shown below[^1^].

    simple serial programmer circuit for at89c2051 at89c51
    DOWNLOAD https://byltly.com/2wGwDn







    The H-bridge is made of four transistors (two PNP and two NPN), four diodes and four resistors. Each pair of transistors forms a switch that can connect or disconnect the 12V supply to the reset pin of the microcontroller. The Arduino controls these
    switches by sending logic signals to their bases through two resistors. When one switch is on, the other one is off, and vice versa. This way, we can toggle the 12V supply between ground and reset pin.


    The power switch/oscillator is made of a transistor, a diode, a resistor, a capacitor and a crystal oscillator. The transistor acts as a switch that can connect or disconnect the 5V supply and the crystal oscillator to the microcontroller's VCC and XTAL
    pins. The Arduino controls this switch by sending a logic signal to its base through a resistor. When the switch is on, the microcontroller receives power and clock signals. When it is off, the microcontroller is disconnected from both.


    The optocoupler is used to isolate the Arduino from the high-voltage programming signals that are sent to the microcontroller's P3.0 (RXD) and P3.1 (TXD) pins. The optocoupler has an LED on one side and a MOSFET on the other side. When the Arduino sends
    a logic signal to the LED, it turns on and activates the MOSFET, which connects or disconnects the corresponding pin of the microcontroller to ground. This way, we can send serial data to and from the microcontroller without risking damage to the Arduino.


    The ZIF socket is used to hold the microcontroller chip securely and allow easy insertion and removal. It has 20 pins that match those of the AT89C2051 and AT89C51 chips. Make sure you align the notch on the chip with that on the socket.


    Programming the Arduino

    The Arduino acts as a bridge between your PC and the microcontroller, so you need to program it with a sketch that can communicate with both sides. You can download this sketch from this GitHub repository. Open it in Arduino IDE and upload it to your
    Arduino UNO board.


    Installing Programmer Software

    To program your microcontroller, you need a software that can send IntelHex files to it through serial port. One such software is at89overlord[^2^], which is an open source programmer for AT89C2051 written in Python by piotrb5e3[^1^]. You can install it
    by following these steps:



    Create a Python virtual environment.
    python3 -m venv venv
    . venv/bin/activate

    Install at89overlord using pip.

    35727fac0c

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)