# 8051-Programming-Using-Keil-uVision
We are going to see to how to program 8051 MicroController using Keil uVision5
### Download Link :
Keil uVision5
## Creating a Project in Keil uVision
When we open Keil uVision For first time we will be able to see ide as shown in figure below.
![](https://github.com/images/img1.png)
To create a new 8051 project using Keil IDE, Click on the ' Project ' item on the IDE Menu bar and select ' New uVision Project... ' as shown in the above image.
![](https://github.com/images/img2.png)
Now create a Folder to store your project and give a name to your Project files (*.uvproj), for eg exp1 (exp1.uvproj) , then `save` it.
![](https://github.com/images/img3.png)
## Selecting 8051 MicroController
* After saving the project , a dialog box will appear to select a Device
* Then type "at89c51" in search box
* Click on `AT89C51` and click on `OK`
![](https://github.com/images/img4.png)
You will get another dialog as shown below. Asking to copy STARTUP.A51, Click on `No`
![](https://github.com/images/img5.png)
## Writing Code
Now inorder to write code we need a blank file , Click on `File` >> `New...` or can use keyboard shorcut `Ctrl`+`N`
![](https://github.com/images/img7.png)
Write a code as shown in the figure below
![](https://github.com/images/img8.png)
Now "Save As" the file , Click on `File` >> `Save As...`
![](https://github.com/images/img9.png)
Give a file name to your code with extenstion *.asm, for eg code.asm , then `save` it.
![](https://github.com/images/img10.png)
In left corner you can see a `Project`Box , in that `Project` Box expand `Target 1` , then Right click on `Source Group 1`, Then click on `Add Existing Files to Group 'Source Group 1'...`
![](https://github.com/images/img11.png)
Select the Files of type : `Asm Source file (*.s*;*.src*;*.a*)` , Select the file with extenstion *.asm , here in my case it is "code1.asm" , Click on `Add` and click on `Close`
![](https://github.com/images/img12.png)
## Project Build
To Bulid Project , Click on `Project` >> `Build Target` or press on `F7` key
![](https://github.com/images/img13.png)
If the Build is successful there will not be any error or any warning as shown in the figure below , else verify the code and rebuild it.
![](https://github.com/images/img14a.png)
## Debug and Run Code
Next step is to debug the code , For that click on `Debug` >> `Start/Stop Debug Session` or press on `Ctrl`+`F5`
![](https://github.com/images/img15.png)
After Entering to debug , you will have a similar screen as shown in the figure below
![](https://github.com/images/img21.png)
Next step is to Run the code , For that click on `Debug` >> `Run` or press on `F5` or click "Run" button highlighted in green color
![](https://github.com/images/img22.jpg)
After a few seconds we need to Stop running the code , For that click on `Debug` >> `Stop` or click "Stop" button highlighted in red color
![](https://github.com/images/img18.jpg)
Before Closing the Keil uVision We need to stop Debugging , For that click on `Debug` >> `Start/Stop Debug Session` or press on `Ctrl`+`F5`, Then close it
![](https://github.com/images/img15.png)
# Assembly Language Programming experiments
* ###
Data transfer/exchange between specified memory locations
* ###
Largest/smallest from a series
* ###
Sorting-of-data(Ascending & Descending)
* ###
Arithemetic-Operations
* ###
Sum-of-a-series-of-8-bit-data
* ###
Matrix-Addition-of-8-bit-data
* ###
Square-and-SquareRoot-of-8-bit-data