8051 Controller Board

Wichit Sirichote, wichit.sirichote@gmail.com

New design 8051 controller board using high speed STC12C5A60S2 MCU.


The new design 8051 controller board is built with the STC12C5A60S2, 40 pin DIP Microcontroller.. The STC12C5A60S2 is hardware and code compatible with 8051 architecture. Addition 10-bit ADC, 2nd UART, more I/O ports and In Application programming are included. The chip has 60kB Flash, 1K RAM, 1k EEPROM. This 8051 controller controller includes 4-digit 7-segment display, optional LCD interface bus, 4-tact switches, speaker driver and 0-5V analog voltage source. The board has CH340 USB interface. The USB port can use for Flash programming.

Main components:

1. STC12C5A60S2 microcontroller, single clock instruction cycle, 60kB Flash memory, 1kB RAM, 1kB EEPROM
2. Onchip 8 Channel, 10 bit ADC
3. CH340G, USB-UART interface chip,
4. LTC4727, super bright 4-digit 7-segment display,
5. 16x2, text LCD module.
6. Speaker driven with tone signal (programmable).
Board layout

Hardware

The MCU is STC12C5A60S2, single cycle 8051 architecture. The chip uses XTAL, 12MHz. The onboard display is 4-digit 7-segment, LTC4727. Port 0 drives the segment, and port P2.0 to P2.3 drive common pins. SW1, SW2, SW3 and SW4 connect the common pin. The MCU detects key press at P2.4. JR3 is optional 16-pin header for LCD interface. The speaker is driven by Timer 1 programmable tone signal.

S3, 2-position DIP switch is for selecting between P1.0 or ADC0 input, and P3.5 or Tone driven to speaker.

JR1 and JR2, 16 pin header provide the I/O port experiments

SW5, Flash loader button is non lock push button switch. When pressed, turns the board power off, use for cold boot starting to run the ISP program.
 
Hardware schematic (click to enlarge). 

Flash Loader

To program the code, run the software STC-ISP, V6.95.

1. Select the MCU chip, STC12C5A60S2

2. Select the COM port, (COM5) USB-SERIAL CH340 ( Hardware driver for CH340 must be installed)

3. Open code file to be loaded

4. Press Flash Loader Button, HOLD it.

5. Click DownloadProgram, then RELEASE the Flash Loader Button. The ISP code will try to sync with PC loader, the display will show operation status.
Flash loader software STP-ISP

Sample C programs using Mikro-C for 8051.

1. ADC.C, display ADC readings 10-bit resolution at ADC0 pin, ADC.hex
2. SOS.C produces MORSE code SOS using timer1, SOS.hex
3. TIMER.C, use timer0 and timer1 with 10ms interrupt, TIMER.hex.
4. UART.c use BRT register for BAUD rate generation at 9600, UART.hex
5. DEMO.c preloaded code for 8051 controller board, press SW1 for blink, SW2 for SOS, SW3 for Timer running and SW4 for ADC testing, DEMO.hex

6.LCD4bit.c Test code for 4-bit LCD interface, LCD4bit.hex


PARTS LIST

Semiconductors

U1 LTC-4727JR, 4-digit super bright common cathode display
U2 STC12C5A60S2, 40 pin DIP STC microcontroller
U3 CH340HW-728, USB 2.0 adapter board

D1 DEBUG LED, 3mm yellow LED
D4,D2 1N4733 5.1Vz 1/2W
D3 LED BOARD POWER, 3mm red LED
D5 1N4148, Silicon signal diode
Q2 BC557, PNP transistor

Resistors (all resistors are 1/8W +/-5%)

R1,R5,R10 1k
R2,R4,R8 10K
R3 1k RESISTOR SIP 9
R6 5 Ohms
R7 20 Ohms
R9 4k7
R11 100 Ohms

Capacitors


C1,C5,C6,C8,C9 100nF
C2,C3 22pF
C7,C4 10uF

Additional parts


JR1,JR2,JR3 CONN RECT 16, pin header 16
LS1 SPEAKER, 10x15mm small speaker
Q1 12MHz SMD

SW1,SW2,SW3,SW4 SW TACT-SPST
SW5 SW SPDT, non lock push button
S3 SW DIP-2, dip switch 2 position

100x95mm double side PCB

 

Download STC12C5A60S2 series MCU Data Sheet

Schematic, STC ISP Flash programmer v6.95


More information please contact: wichit.sirichote@gmail.com

 


<

Last updated, September 2025

August 2025