Cheap AVR/51 Development Board





Introduction: Cheap AVR/51 Development Board

I recently discovered STC microcontrollers produced by TSMC. Being curious about these microcontrollers I started looking for a development board for them.
After some searches on google / ebay / AliExpress / I decided to buy this PCB that I ordered on AliExpress at an affordable price of $ 10 / 2 pieces (In fact I reordered ten pieces of PCB in total and five complete kits for me and my team)

After analyzing circuit I realized that may be used for ATMEGA162, ATMEGA8515, AT89S51, AT89S52 besides STC8051 and that made ​​it interesting enough to continue.

Step 1: PCB

The PCB is very well made. and the component side is very good marked.

Although the markings on the PCB are self-explanatory I felt the need to have a circuit diagram of it (and some sort of user-manual).

Step 2: Schematics

I made circuit diagram in Kicad (In my opinion the best freeware software for drawing electronic diagrams and printed circuits boards).

For printing I recommend downloading the PDF file attached. Although it is in A3 format can be printed on A4 or Letter.

KIcad project files will be available after completion of the PCB design (will be posted as reference are not required for this Instructables, nor for the use of the development board). For this tutorial it is sufficient diagram in PDF format.

Step 3: Overview of Components

All components will be detailed in the following steps

Step 4: Resistors

We started installing the small components. This step is about resistors.

Step 5: Diodes and LEDs

Step 6: Capacitors and Transistors

Step 7: Small Connectors and Switches

Step 8: Last Components

Step 9: Completed Boards.

For programming ATMEL microcontrollers I used a programmer USBASP compatible and AVRDUDE .
Attention to the JTAG interface. If you want to use the entire PORTC must disable the JTAG interface. Anyway development board does not have JTAG connector.

For programming STC microcontrollers we do not need specialized programmer.
It only requires a serial cable if your computer has serial port. If not,  will work with a USB to Serial adapter (work with the cheaper and slower adapter found with $ 3 on ebay). But there is a catch: It is necessary to use a specific software for these microcontrollers.
I will not insist on programming STC microcontrollers because it is not the purpose of this intructable. Additional information (including data sheet in English) can be found on

I will supplement with additional information as soon as possible

Step 10: With ARDUINO and ATMEGA162

Development board can be made ARDUINO compatible  if used with ATMEGA162 microcontroller.
(Note: This is not supported by the official Arduino libraries)

To use ARDUINO need to be made ​​the following changes:

1. In the <arduino>\hardware\arduino\avr\boards.txt file, add these lines:

############################################################## ATmega162




2. Make a folder
in this folder save file [pins_arduino.h]

3. We will overwrite the file iom162.h in folder
[<arduino>\hardware\tools\avr\avr\include\avr\] with the file attached here.

4.File [optiboot_atmega162.hex] will be saved to:

Step 11: Arduino IDE

Arduino configuration is finished now.

I use the programmer USBASP bought for $ 3 on AliExpress.

I have not yet tested the bootloader because my USBASP programmer stay connected to the development board all the time. :)
It is necessary considering using almost all available processors for this board. And also not just use Arduino/Processing, but other programming languages ​​(C, ASM).

Step 12: With LCD16x2

Here's a sample code to use a 16x2 display.
I used an old display without backlight so I can take the picture. :)
// include the library code:
#include <LiquidCrystal.h>

* LCD RS pin to digital pin 8
* LCD Enable pin to digital 19
* LCD D4 pin to digital pin 31
* LCD D5 pin to digital pin 32
* LCD D6 pin to digital pin 33
* LCD D7 pin to digital pin 34
* LCD R/W pin to ground ... in this case digital pin 9 -> LOW

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 19, 31, 32, 33, 34);

const int RWPin = 9;

void setup()
  // set the digital pin as output:
  pinMode(RWPin, OUTPUT);
  // R/W Pin to ground
  digitalWrite(RWPin, LOW);
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.

void loop()


Step 13: Last Word

Into final, result is to get a PCB designed mainly for exotic processor (STC51) and extend the possibilities up there, it can be used with a friendly environment like Arduino.

Into the next few weeks I will update information on
I will provide code in Arduino and C to explore all possibilities of the board.
and I work on a new Instructable for ATmega32 development board, compatible Arduino, designed from scratch.




    • Epilog Challenge 9

      Epilog Challenge 9
    • Paper Contest 2018

      Paper Contest 2018
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    Hello Silvius,

    Thank you for your post.

    I could not find the exact same board on aliexpres, banggood or ebay.

    So I want to build this board I have couple of Atmega162. I will order the rest of the parts and send the PCB for manufacturing. Do you know which layers in KiCad should you expoft for making the gerber file? I am new with KiCad.

    Thank you very much.

    I have some bad news and some good news about this board. :)

    The bad news:
    The KICAD project was not meant to be reproduced exactly as it is. Actually I needed the project schematic. And because I did not have it, I decided to do it in KICAD (as an exercise to develop my knowledge about KICAD).

    So no checks for correctness have been made. It can be used as starting point by someone who has solid knowledge about this application. I do not count among them, unfortunately.

    Meanwhile (four years have passed since then) I stayed with gEDA, a suite I know better, and I designed some projects (and I ordered them to different PCB manufacturers).

    I know most will say that KICAD is better than gEDA (and I do not want to contradict them), but after I got to know well gEDA, I do not need another EDA application anymore :)

    The good news is that this development board still exists on Aliexpress. Look here:

    And I still have a few available, both the complete(and assembled) kits and bare PCBs. At that time I bought more than I needed :)
    If you do not have another solution and you absolutely need it, we can get in touch(by private message) and send you one of them (or a few).


    Thank you very much Silvius.

    Sorry for my late response.

    I wanted to learn how to send boards for manufacturing so that is why I asked.

    I will see if I get the boards from AliExpress.

    Thank you very much Silvius.

    Best Regards,

    Hi, can you give any support with this adapter YSUMA01-341A? I'm trying to program a STC12a5a60s2 chip.

    No... Seems like a very interesting adapter... I do not have such an adapter... or STC12A5A60S2.

    hi have you ever used nthe stc controllers?ime thinking of giving them ago,just need to find the ide for them.

    Thanks great instructions I have had the same board for some time now and been looking every where to use it.. The only problem now is when I try uploading a program is this error:

    avrdude: warning: cannot set sck period. please check for usbasp firmware update.

    avrdude: error: programm enable: target doesn't answer. 1

    avrdude: initialization failed, rc=-1

    Double check connections and try again, or use -F to override

    this check

    Again Thank You

    I need some more information for a proper answer. (microcontroller type, quartz frequency, using Arduino IDE... or not...) I'll try anyway.

    I'll assume that you use ATmega162 in Arduino IDE, with 16MHz quartz ...

    You can ignore avrdude warning... It's about old firmware in USBASP device... you can use another usbasp to upgrade firmware... or self-programing (depending on your USBASP)... or or you can leave it as it is (the safest choice).... :)

    avrdude: error: programm enable: target doesn't answer. 1
    avrdude: initialization failed, rc=-1

    These two last messages telling that the microcontroller does not respond at all. There may be many causes.

    1. Incorect fuse setting.. SPIEN disabled or CKSEL =0000 ... or.

    2. microcontroller defective

    3. The two jumpers near reset button (marked with AVR/51) must be in AVR postition for Atmega and in 51 position for STC ...

    I hope my answer to be useful to you...

    i got it. a picture just for me. great! thank you so much.