After some strugling I finally managed to program my developing board!
– The board development kit: Stc Minimal dev kit
– I used MCU8051 IDE as a development environment, It can be downloaded here
and finally the STC programmer, I found it at STC site:stc-programmer v4.80 It is written in Chinese, but with a little help you will be able to use it.
First, you have to install the MCU805Ide, you only have to run the setup, it is really straightforward. The ide will require a compiler, so I used SDCC, a free one, so install it and configure MCU8051ide to use it. Go on Menu Configure->configure compiler and tell the ide where is the compiler.
Create a new project, and type a small program, i used this one:
* Very very simple demonstration code written in C language
* @file demo_c_0.c
// This file defines registers available in AT89x51 MCUs
// See /usr/share/sdcc/include/mcs51/ for alternatives
unsigned long some_variable=0; ///< Documentation for this variable comes here
int i=0; ///< General purpose interator
* These lines are a doxygen documentation for this function
* See doxygen manual for more details (http://www.stack.nl/~dimitri/doxygen/manual.html)
* Note: Try to click on the 1st line of the function declaration and then press Ctrl+E
* Some bold text
* @param somevalue Some agrument
void someFunction(unsigned char somevalue)
// P1 and P3 are variables defined in “at89x51.h”
void delay(int );
/** Main loop */
// Infinite loop
if ( i == 255 ) i=0;
// Report success
void delay(int i)
for ( j=0; j< i; j++) for(k=0;k<1000;k++); return; }
On this kit, P1 has leds attached, so the hello world program in this case, will blink in a binary counting.
The delay routine will run for a while, and give a delay about 1 msec.
Compile the program ( F11 ) and look for it at your project (mine was at /user/myuser/projectname , look for the .hex file generated, you will use it to program your controller.
We are ready to burn!
Start stcprogrammer, you will see lot’s of Chinese stuff…
Press the button 1 – and select your just compiled .hex file, the programmer will read it to the buffer.
At 2 – You will select your com port, the speed will be deteced, don’t worry.
At 3, have your dev kit connected, and press the button, I had to power down my controller removing the chip from the socket – that’s the only thing that worked for me – if someone found another way, let me know…
Then the programmer will upload, and your circuit will blink!! That’s it!