Assembly Language Program using Keil uVision 4


1. Start Keil uvision4, you see a start screen similar to this (or may be somewhat different but it doesn’t matter much.
starter

2. Click on Project -> New uVision Project
New uVision Project

3.  Enter your Project name and choose location where your project will be saved, its recommended to create a folder as a project   consists of many files.
creating folder

4.  Choose device for which you are writing code, for this example i am using AT89C51, a version of Intel 8051 microcontroller by Atmel.
Intel 8051 microcontroller by Atmel

5.  Click No when a screen like below comes if you want to write your code from scratch.
scratch code

6.  Click File-> New
new file


7.  Enter the code in editor window.
enter code in window


8.  Click File-> Save
saving file


9.  Name the file with .asm extension. e.g. I have named my file in this example as sid1.asm
.asm extension


10.  Right click Source Group 1, and then left click Add Files to Group.
source group 1


11.  Go to the location where you have saved your file written previously and Click Add.
location


12.  Go to Project-> Options for Target
options for target


13.  Click on Target in upper menu and adjust the parameters according to your device. For 8051 microcontroller choose parameters as below (for a small program and if you are not using external ROM to store your program).
choose parameters

14.  Click output in upper menu and mark option Create HEX File. After adjusting all parameters click OK.
creating HEX file


15.  Click Project-> Build target
Building Target


16.  If your file compiles successfully you will get message as below, if you are getting some errors then correct them and Build again.
building again

No comments:

Post a Comment