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.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

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.


Be the First to Share


    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    26 Discussions


    2 years ago

    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.

    2 replies

    Reply 2 years ago

    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).



    Reply 2 years ago

    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,


    2 years ago

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

    1 reply

    Reply 2 years ago

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


    3 years ago

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

    1 reply

    4 years ago on Introduction

    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

    1 reply

    Reply 4 years ago on Introduction

    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...


    4 years ago on Introduction

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


    4 years ago on Introduction

    is it possible to program a stc12c5a60s2 MCU using this board connected to a USBtinyISP's ISP header, i.e., PC > usbtinyisp > TSMC dev. board.

    2 replies

    Reply 4 years ago on Introduction

    No. USBtinyISP is for ATmega. To program STC MCU you need only USB to serial adapter, or serial cable (if you have serial port available on PC). You have to connect the board to PC using serial port. You have to set jumpers of dev board for STC like in picture attached.

    And you need to use a specialized app for STC MCU. Check the link below:


    Reply 4 years ago on Introduction

    STC MCU have built-in bootloader. After you hit PROGRAM button on flashing APP you need to press Reset button on dev board about ~1 second for bootloading sequence.


    5 years ago on Step 12

    Can you tell me if this board can handle other micro-controllers ? I mean, microcontrollers with same pinout ?

    4 replies

    Reply 5 years ago on Step 12

    Yes. Same pinout: ATMEGA162, ATMEGA8515, AT89S51, AT89S52

    With an adapter working even with Atmega16, Atmega32, Atmega64 (DIP40).

    You can search 51 MCU ATMEGA16/32 Chip Converter.

    Should look like image below. About $4.52 on e-bay (quick search) ... I think you can find cheaper if you try searching more.


    Reply 5 years ago on Step 12

    Thanks !

    I have one more question. I have a very similar board, (with less devices^^) and a AT89S52. I usually work with AVR Studio and AVRDUDE (+usbasp) to flash my micro controllers. Unfortunately, the AT89 is not supported by both AVR studio and avrdude.

    Did you know if it is possible to add the AT89S52 to the Arduino IDE to the file boards.txt ?


    Reply 5 years ago on Introduction

    AT89S52 is indeed an Atmel microcontroller but not part of the AVR family. ...and AVR Studio and AVRDUDE... is as the name says for AVR :).

    The reset pin on the AT89S52 is active-high.

    The reset pin on an AVR is active-low.

    AT80S52 microcontroller can be programmed with USBASP and progisp172. Search progisp172 or progisp1.72 .

    About arduino... not working with boards.txt method as above. AT80S52 microcontroller architecture is totally different from AVR, another compiler, other libraries, etc...


    5 years ago on Introduction

    i tryed to open the pro file with Kicad but dont work can you post a photo of the Schematic file using proteus Thank you

    1 reply

    Reply 5 years ago on Introduction

    I have not installed on my computer Proteus.

    I use KICAD (and GEDA.) This project is made entirely in Kicad.

    You may have used an older version of Kicad?

    This is my version:

    Application: KiCad
    Version: (2013-07-07 BZR 4022)-stable
    Build: wxWidgets 2.9.4 (wchar_t,compiler with C++ ABI 1002,GCC 4.7.2,wx containers,compatible with 2.8)
    Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
    Boost version: 1.53.0