| English | Portuguese | Description |
|---|---|---|
| Introduction to HC6800-EM3 Development Kit | Imagens Detalhadas | Overview of the board and features |
| Flash Instructions for the STC90C516RD µC | Instruções para o Download de Firmware para o µC STC90C516RD | Instructions to flash a firmware into the STC90C516RD |
| unavailable | Verificando o Funcionamento (STC90C516RD+) | Steps to verify how to operate the kit using the STC90C516RD+ |
| unavailable | Verificando o Funcionamento (STM32F103C8) | Steps to verify how to operate the kit using the STM32F103C8 |
| unavailable | Convertendo o HC6800EM3 em um Arduino (Parte 1) | Instructions to install an Arduino-compatible bootloader into ATmega162 µC |
| Convertendo o HC6800EM3 em um Arduino (Parte 2) | ||
| Convertendo o HC6800EM3 em um Arduino (Parte 2b -- complemento) | ||
| Convertendo o HC6800EM3 em um Arduino (Parte 3) |
The HC6800-EM3 development kit is an affordable development kit having most of the necessary hardware build into a single development board.
It is usually found on Chinese online shopping, such as the AliExpress (Search for the terms "avr arm 51 experimental kit").
Its main advantage is to incorporate almost all interface chips into this single board, instead of buying an Arduino-style board and many break-out modules, you will have the most important peripherals already integrated and the price in the range of US$50,00.
As one will notice there are many different versions of this board. The most common is the v2.2 which has an 8×8 dot-matrix display and the v3.0, which upgrades to a 16×16 dot-matrix display. This document covers the v3.0.

The package contents vary according to the sellers offer, but the core of the kit is an 80C51 compatible micro-controller (STC90C516RD+) and in some cases a daughter-board containing an ARM compatible controller (STM32F103C8T6).
The kit contains many elements as described in the next topics.
The board comes with a ZIF socket where one can insert an electrically compatible micro-controller. Note that the pin-out used is an 80C51 standard one and is compatible with many micro-controller found on the market.
In the case of other controller technology an adapter is supplied to keep the connections compatible.
The following options are covered for this document:
This is an 80C51 clone developed by a Chinese supplier namely STCmicro (www.stmcu.com) and most information on them are published in Chinese.
An English data-sheet of a family member is supplied on the DVD and should be enough for the general developer.
The STC90C516RD+ operates between 2.2V and 3.4V and has 61K of Flash memory, 1,280 bytes of SRAM, 3 Timers, 1 UART, up to 35 I/O ports, watchdog, on-chip power-on reset, idle mode with 4 wake-up interrupts.
To insert the chip follow these instructions:
|
![]() |
The schematics for the CPU is:

Important to note that all I/O’s are pulled up to VCC and have jumpers so we can connect cables for interfacing.
The crystal is also selectable, but comes with a 12 MHz factory pre-installed one.
One disadvantage of this board is that the pins 29, 30 and 31 are not connected (PSEN, ALE/PROG and EA/Vpp respectively). Although they are rather unnecessary for the 80C51 part it could be useful for the STM32 and AVR controllers, which offers more I/O options.
This is a very common ARM chip produced by STMicroeletronics (formerly SGS-Thomson) and is supplied on an adapter board, to make it pin-compatible to an ordinary 80C51 pin-out.
The STM32F103C8T6 is Cortex M3 implementation running at up to 72 Mhz, with 64Kb Flash, 20 Kb SRAM, operates from 2.0V to 3.6V, Power-on-reset, RTC, Power management, A/D, temperature sensor, DMA, 37 I/O pins, SWD and JTAG debug interface, 3 timers with PWM, 2 watchdogs and SysTick timer; I²C, USART, SPI, CAN and USB interfaces and a CRC calculation unit.

The ARM microprocessors are generally more complex than those old 8-bit ones and depends generally on peripheral libraries to use its peripherals.
The STM32 adapter board has the following features:
To connect the STM32 adapter board:
This micro-controllers is a family members of the well-known 8-bit AVR platform, that is pin-compatible to the 80C51 socket. Except for the RESET polarity it is a drop-in replacement for a standard 80C51 controller.
The ATmega162 has a maximal 16 MHz clock speed and operates between 2.7V and 5.5V. It has a RISC 8-bit CPU, 16Kb of Flash, 512 bytes EEPROM, 1 Kb of SRAM, JTAG debug interface, 4 timers, Real time counter, PWM, dual USARTs, SPI, Watchdog, Analog comparator, Power-on reset, power management and 35 I/O lines.

To insert the chip follow these instructions:
One of the characteristics of the AVR chips is that the ISP is made using an SPI interface, instead of the normal UART.
The HC6800EM3 offers the ISP connector, compatible to a typical AVR ISP interface (not included in the package):

As a work around, the Arduino Project added a boot code that can perform ISP using a standard USART. Take a look into Tutorials\Arduino BootLoader folder in this DVD.
An alternative implementation can be found on github.com/MCUdude/MajorCore.

Another option to the ATmega162 is the ATmega8515 that also has a maximal 16 MHz clock speed but operates between 4.5V and 5.5V. It also has half the memory specs from his brother and does not feature the JTAG interface.
Although it works almost exactly as the ATmega162, it is not a recommended part, since it is of an older generation.
For some source codes we have provided a MSP430 version using the MSP-EXP430G2 LaunchPad, which is a very affordable solution (US$10) which also incorporates a JTAG-like debugger.
The MSP430 is a controller developed by Texas Instruments based on a 16-bit CPU and features an unprecedented Ultra Low Power (230µA at 1 MHz) design which are very useful for battery powered devices.
The MSP430 operates between 1.8V and 3.6V and features a 16-bit RISC CPU, 16Kb Flash, 512 bytes SRAM, up to 16 MHz, 2×16-bit timer, advanced power management, ultra fast wake-up, capacitive touch enabled I/O, USCI (implements USART, IrDA, SPI and I²C), Analog signal comparator, 10-bit ADC, Brownout detector and serial ISP.
This is a tiny member of the family. For more complex projects it also offers controllers with up to 25 MHz, 512Kb flash, USB interface, 195 µA / MHz and exceptional ADC precision. A cheap alternative is the MSP-EXP430F5529LP (US$12.99).
The board requires a 5V power supply and has two different input sources. The first option is the USB connector and the second is a DC barrel jack type input.
As most modern micro-controller can't operate with a 5V power supply, the board incorporates a 3.3V regulator.
This is the schematics:

Note that this image shows the circuitry taken from the 5V external connector, The next schematics completes the circuitry:

The USB 5V output is connected to the +5V wire and both serves as source for the 3.3V regulator.
The board features some useful power setup options.

This is the most important control on the power supply and lets us power on or off the board at the main level. A second level power on/off control is performed by the build in relay (some board features a solid state switch), which will be covered later.
One can select the operating power between 3.3V and 5V using the J-PWR jumper, near the ON/OFF button.
For the most modern processors the voltage should be set to 3.3V. As a general rule you should read the specification of the processor you are attaching to the board and select the operating voltage properly.
The JPWR 4-pin output will provide an additional power supply source, if required by any optional breakout board.
Note: This jumper is located tight to the relay and needs a pincer > to be accessed.
Depending on the ISP software the RTS and DTR lines may not be in the correct state and the development board will not power up, even if the power led lights up.
This occurs because the RTS and DTR lines of the serial port controls a relay that controls the power flow. The ON jumper allows us to bypass this relay and the board will only depend on the ON/OFF button state.
The board features a reset circuit that has the feature to choose the reset pulse
polarity.

Use the J9 jumper to choose the reset pulse polarity. For 80C51 compatible MCUs put the jumper in the HH position. For AVR MCUs use the LL position. This jumper has no effect if you use the STM32 adapter board and this configuration can be ignored.
Use the RSTK button to restart the MCU. Instead of using the ON/OFF switch, this is the preferred way to restart your device.
A set of embedded peripherals are mounted into the HC6800EM3 Development Kit, which will be covered shortly in the next topics.
The board offers two serial communication options: The CH340 USB→Serial chip is the most common option and the regular serial cable interfaced through a MAX232 chip.
The main advantage of the USB option is that it allows us to power the board as long as connected to your PC, in the other hand the ordinal serial cable requires an external 5V power supply connected to the DC barrel jack input.
This module has some important jumpers and connectors, which will be covered shortly.

Insert a standard A/B USB cable connecting the board to a free USB port on your PC. It is recommended to connect the board to a USB 2.0 connection, although the board is also compatible with other USB versions.
This is an optional feature of the board, since no cable is supplied with the product. If one needs to use this option you will need to buy one on a local store and, most important, most modern PCs, won’t figure an RS232/C connector.
Another drawback is that this option will be more difficult for the ISP (In System Programming) operations, since it does not interface with the DTR/RTS pins which are required by some implementations.
This jumper exposes the DTR and RTS pins of the CH340 chip, which should be used for the STM32 ARM adapter to perform ISP.
These jumpers determines the serial chip that will be used (CH340 or MAX232). You should place both on the same position, either USB or DB9.
Regardless of option you select these lines connects to the P3.0 and P3.1 pins of the 80C51 controller (RXD – pin 10; TXD – pin 11).
Note that in the case you won’t connect the MCU to the serial port you can remove both jumpers and use this pins as regular I/O pins.
The board implements a MAX485 IC which is an independent module. This is its schematics:

You should use wires to properly connect the MCU to the J-485. The RS485 connector should be connected to a compatible 485 bus.
One example provided on CD interfaces the MCU to a standard USB keyboard and this is the circuitry.
You should connect wires from the MCU to J10 according to the instructions of the example program.


As temperature sensor a 3 terminal port is provided that comes pre-installed with a Dallas DS18B20 sensor.
Note that the flat side of the IC should be facing you. Do not invert the polarity of the pins or you may cause damage.
Note that the I/O pin is connected to the P3.7 port of the MCU. So, if you want to use the P3.7 pin for other purpose it is recommended to remove the DS18B20 from the socket.

An Infrared Sensor is also provided, that it also pre-installed in a 3 terminal port. You should also check the polarity of this component so you won’t damage anything: the round part of the component should face you.
Different from the temperature sensor you can interface to it only if you enable the J1 jumper, which connects the IRD pin to the P3.2 MCU pin.
Be sure to let the J1 jumper disabled if not working on an IR program example.
Another peripheral set of the HC6800EM3 is a simple 8x Push Buttons array. This can typically be connected to a MCU port and is quite easy to program, because all signals are independent.

This is the schematics of this peripheral:

To use this peripheral you will simply connect a parallel cable from the port to the JP5 connector.
Since all MCU ports are pulled up (see the STC90C516RD+ topic for details), the program will read a ‘1’ on the respective pin, while it will be short to ground when the button is pressed and a ‘0’ is obtained.
Such a circuit is ideal to be handled by an interrupt routine, because the MCU can react only when a button is pressed and keep low power state in an idle state if nothing occurs.
This is a technically more complex application for push buttons interface, which doubles the total number of buttons using the same number of I/O pins, since the buttons are organized as matrix.
But because of this organization this is really not ideal for interrupt driven inputs and one should use a timer and continuously scan the port for state changes. The complexity is higher and the power requirement rises accordingly.
The schematics is very simple:

Note: This is a typical example where an MSP430 MCU excels, since it can wakes up very fast and briefly run the timer interrupt service to scan the keys and then enter sleep mode again. Since the duty cycle is very short, no significant current is drawn.
This peripheral is mounted with red push buttons and interfaced through the JP4.
Similar to a “Hello World” application, applications driving LED’s are the most common startup examples.
The HC6800EM3 offers a multitude of LED peripherals. In this case these are 10 LEDs intended to be directly driven by the I/O pins.
The schematics follows below:


The JP1 connector is designed to be connected to an 8-bit port. Two additional wires should be added on J22 for a complete use.
Note that the LEDs are connected to VCC, so one should write ‘0’ to a pin to turn the LED on.
The analog to digital converter is a required interface for any decent analog application on the MCU world and are offered on most modern MCU today as part of the chip. In the case of entry level MCUs the AD is commonly not a part of the package (MSP430 is an exception to this rule).
The HC6800EM3 implements an AD interface around the PCF8591P chip, which is an 8-bit A/D converter with a I²C interface.
This device offers 4 analog inputs and one analog output. Three of the four inputs are supplied with a set of interesting analog components:
On the other side the output is connected to a LED and one can use it externally through J4.1.
Note that a LED intensity does not react linearly to the output voltage, but it will help to understand the D/A lessons. If one wants better control to the LED intensity, a PWM implementation is the recommended way to go.

The schematic is shown below:

The board features a relay controlled by the J2 jumper. For the example programs from the DVD this jumper should be connected to the P1.4 I/O. Writing a ’0’ on the port will actuate the relay.
This is the schematics:

There are two connectors on the board the NO and NC (Normally Open and Normally Closed). So if one connects a device to the NC port it will be normally on and as the relay actuates the contact will open. NO connector works the opposite.
A common use for an MCU is generation of beeps. Although this type of connection is not appropriate for high quality sound, one is able to provide basic sound feedback for a user using such a peripheral.
The circuit is shown on the picture at left. For the example programs one should connect the P1.5 to the J8 jumper.

For power applications the board provide a well known Darlington array, the ULN2003D. It offers to input connectors IM1 and IM2 that drives current to the M1 and M2 output connectors for a total of 8 lines.

This device can easily drive little DC motors and its schematics is shown below:

For motors with more power a better driver is needed and this is implemented around the UDN2916 chip. The schematics follows below:

The M_IN connector is the input while the stepper motor should be attached to M_OUT.

One interesting interface option is the shift register, which allows one to obtain many output lines with just a couple of I/O pins. In this implementation, up to 32 bits are possible to shift into them.
This is the schematics:


Note that a single input is attached to the P3.4 I/O and the shift registers are cascaded. Pins P3.5 and P3.6 are also used for clock and latch control.
The lower 16 bits are connected to the P595 A and P595 B terminals. The top 16 bits are connected to the LCD dot-matrix display and can only be used for that purpose.
To enable this module you should short the JP595 jumper.

The 16x16 LED Dot-matrix circuitry is the main feature of the v3 board. This component requires the use of the 74HC595 shift register, since the µC can address so many pins.
It is an independent circuit which needs to be connected using the J17 and J18 to be driven and besides this, U16 and U17 are also necessary (74HC595).

The schematics is shown below:

Note that the NEG1 to NEG16 are connected to the shift registers (74HC595).
This is a classic logic chip, which enables a 3 bits value be converted to a single output line of the 8 possible values.
Note that all outputs are connected to J15, which in turn is aligned to J16, enabling on the jump them together to drive the 8×7 Segment Digit block. In this application the processor select one of the 8 digits by driving a 3 bit value into the 74HC138 decoder and by scanning through all digits very fast, it is possible to display compound values.


By removing the jumpers, one can use the outputs by means of an 8-wire parallel cable (provided in the kit).
The HC6800EM3 features a classic 2K (256×8) two-wire serial EEPROM, which main characteristics is to store information in a permanent state. One can reprogram the memory to store new values that will be kept even without a power supply.

This is the schematics:

It is important to note that this component is permanently connected to the P2.0 and P2.1 of the µC, while the WE (Write Enable) is permanently activated. This limits the use of the Port 2 of the controller, which could cause undesired interaction if used in another application.

This is a very useful component of the kit, which allows one to display numeric data using one of the most classic data display form of the recent human history: the 7 segment digits.
To connect this peripheral it is necessary to enable the J21 and drive the U13 (74HC573 – Octal latch), that serves as buffers to drive the LEDs. To control the LEDs one need to add data to the latch through the J12, by connecting 8-wire parallel cable (supplied with the kit) to an available processor port.
The image blow shows its schematics:

Additionally, each digit is connected to a pin in J16, which is usually connected to the 74HC138 (see the topic 3- to 8-line Decoder Demultiplexer).
As an alternative, one could connect the J16 to another processor port > and control it directly without the 138 decoder, which is usually not > recommended as it could overload the microcontroller port.
These are the placement of all jumpers:

This component (U8) works in the opposite way as the 74HC595, as takes a parallel data input and serializes to a single output.
To enable the circuit one should connect the JP165 jumper, which ties the QH pin to the P1.7 µC pin.

Additionally P3.6 and P1.6 are permanently connected to the component as shown in the schematics below:

Another option is a single 7-segment Digit, which is easier to interface than the 8 digit block and used as a simple exercise, because it requires less effort to use it.
Simply connect a parallel cable to the JP3 to a µC port to drive it. Write a 0 to the bit that you want to light.

This is the schematic:

One interesting peripheral featured by the HC6800EM3 is the RTC, the DS1302: A real-time clock chip backed up by a battery cell.
The DS1302 features a serial interface, so it is easy to connect to any µC model.

To enable communication with the DS1302, one should close the JP1302, which ties the P3.4 µC pin to the DSIO (Data In/Out) pin. SCLK (Clock) and CE (Chip Enable) are tied to the P3.6 and P3.5 respectively, as shown in the schematics below:

Although most micro-controllers features internally timers with astonishing precision, a classic analog timer component is the NE555.

One can control the period by a trimpot (VR1) and interface occurs via J11 which connects the NE555 OUT pin to the pin P3.5 of the µC and the schematics are shown below:

Additionally to the embedded peripherals a set of daughter-boards are supplied with the kit, allowing one to test very complex peripherals such as a TFT display.
This is a very useful and interesting component of the kit, which allows one to exercise this very common component. The LCD1602 is a popular monochrome display that has two lines containing 16 char each, using a parallel interface.
The daughter-board has a specific socket on the main board directly below the 8×7 Segment Digit block, as shown in the figure below:


Note that the orientation of the pin 1. When you install the daughter-board it will cover the RTC circuit and the 8×7 segment digits will remain uncovered.
The schematics of the J1602 connector is shown below:

The LCD1602 is has it’s data bus connected to the Port 0 of the µC and the other control pins are on the Port 2. Also note a convenient feature is the RJ6 which allows the user to adjust the brightness/contrast of the display.


This component can be inserted in two different forms on the kit. You should check the pin-outs according to the silk-screen. Also note that the example programs has some illustrations to guide your setup.
The board has a multi-purpose socket for distinct display models. For this option, just a single connector is used and the schematics is the following:

Note: It is important to carefully check the pin-outs, since the fail to insert the component to it’s designed position could cause damage to the component.
This is the biggest display that comes bundled with the kit and features a 3.2 inch display with a touch screen and a SD card socket. The complete schematics of this daughter-board can be found on the 3.2-inch TFT Schematics (R61509-16bit bus).pdf file.
It uses a 16-bit interface, ideal for a powerful processor. The SD card uses the SPI interface which is low-speed but much easier to implement than the standard SD bus. The touch screen also uses a serial interface and a full featured example is provided on the DVD.

Wiki: 51_flash
Wiki: 51_flash_ptb
Wiki: arduino_1_ptb
Wiki: arduino_2_ptb
Wiki: arduino_2b_ptb
Wiki: arduino_3_ptb
Wiki: detailed_view_ptb
Wiki: verifying_ptb
Wiki: verifying_stm32_ptb
My prechin doesn't have usual AD/Da IC (PCF8591). Instead it has two other chips. h2046 and LM358. Does anyone knows why?
please can anyone help mw with a guide on how to use the micocomputer(HC6800)
Presumably you've received the 8051-compatible MCU. Download the CD from this project. Use this example: Part 3 x51 Source Code/1. LED's/1. LED Blinking/C Version. Then follow this Tutorial: Part 1 Tutorials/51 Firmware Download Instructions.pdf to flash it to the MCU. THis is a good starting point. For real programming you have to carefully check each example. Most of the examples have Chinese comments, use Google translate as help. Basic digital electronic knowledge is always required, so read Datasheets of the MCU and eventual peripherals, according to the example you are following. Though, if you want a more useful MCU formation I would avoid 8051 completely. It is a weird architecture and nothing but an over-complicated dinosaur. Checkout the repository and you can find a benchmark I did in the past: https://svn.code.sf.net/p/hc6800em3/code/trunk/examples/100.Benchmark/General%20Instructions.odt . Performance differences of anything else is abysmal if comparing MCU technologies. ARM MCUs are powerful but hard to learn. I recommend the MSP430 family, a very underrated family of MCUs, noticeably faster than AVR, using a fraction of the energy. Original kits are cheap and powerful, including a debug emulator, which helps much.