STC15W204S Microcontroller Programming with FTDI.
Dec 25th, 2019 | by: M. Zeeshan | Views 6953
Views 6953
Creating a Keil uVision Project

First of all you have to download the Keil uVision. After Downloading & installing it. Open this software. Now go to Project -- New uVision Project...  then name your project and save it. Next you have to select your device that you're going to program. Simply type 8052 in search engine and select Generic -- 8052(all Variants) and hit ok. See image. Then click No. After this you will see that your project is created successfully. It's time to add the code file that control the on board LED with on board push Button. To create a new file go to File -- New... and just write your code in the editor. See the code image. Don't worry i will share all the source file. 

After writing your code save this file and also add this file to your created project. To add code file navigate to Project and right click the Source Group & Add existing file. Just add your code file that you have written. Finally compile your Project. Wait a minute, after compiling your project you will not get a HEX file in your project directory. You have to enable the option that create a hex file when we compile our project. To enable this, again navigate to project--Target & right click the Target and go to Option for Target.
In Target Options, go to OUTPUT tab and check the Create HEX File. See image.
Now when you compile your project you will get a HEX file definitely. 


Creating the Circuit


  •  Development Board                            FTDI Programmer
  •   P3.0                                                           TX
  •   P3.1                                                            RX
  •   GND                                                            GND
  •   Vcc(Via switch)                                       Vcc
See the Circuit Diagram also. Important:Do not forget to connect the Vcc via Switch. We have to turn ON and OFF the power while Programming the board. Here is the diagram of the Development board that tells us where the LED and the push Button is connected. 
Uploading HEX file

For uploading we need STC-ISP software. You can download the software from the company website or Download from here (All the source File available in zip). Uploading HEX file is simple. Open your STC-ISP software. Then select the COM Port where your FTDI programmer is connected. And click Check MCU. wait... Before clicking the Check MCU button, make sure that power switch is off. It's time to turn ON the power. When you turn ON the power it will find your MCU if all the connections are ok. Select the HEX file you want to upload by clicking Open Code File. Make sure Power Switch is OFF. Then click Download/Program. And turn ON Power.

1 Comment

Login or Sign Up to post comments on this tutorial.