In this tutorial, we’ll learn how to Create Keil project for 8051 Microcontroller using uVision5. In the end of this lesson, we will generate HEX file to load into Flash Memory of 8051.
Step By Step: Create Keil Project for 8051
Before we proceed any further, first launch Keil uVision5 application from computers program menu.
Now click on Project tab and select New uVision Project…
Give any name to project (Here we have given a name as project). And Save project in new folder.
- Now in select Device for Target ‘Target 1’… Search for appropriate derivative from family of 8051 microcontroller (for example: P89V51RD2, AT89C51, AT89S51 etc). Here in this case we have chosen P89V51RD2. As we’ll be experimenting in future with P89V51RD2.
Then select your device and hit on OK.
When ask for Copy ‘STARTUP.A51’ to Project Folder and Add File to Project? Click NO
Now to create source file go to File tab and click on New…
Here save this file with .c (e.g. LED.c) extension in project folder. which we have created earlier.
At this point, we’re ready to write code/program. Now click on File Extension, Books and Environment… tab
Then click on Add Files…
Now select file which we have saved with .c extension. Then click on Add button. And then hit on Close.
Here you can see your file gets added in Files: window. Now click OK
Now click on Options for Target… tab
In Target window type clock frequency which we’re using for 8051 microcontroller. Throughout this tutorial series we are going to use 11.0592MHz crystal clock.
Now in Output tab click on check box of Create HEX File. Then hit on OK
Now click on “Build” tab for building project file. Then click on Rebuild
At this point, if there isn’t be any error then we’ll get HEX file into “Objects folder” with .HEX extension. This is how we’ll Create Keil project for 8051 Microcontroller using uVision5. We hope you will find this tutorial educational. Thanks and see you in next tutorial where we’ll explore different features of P89V51RD2-8051 Microcontroller with some cool example projects.
Products from Amazon.in
- Price: Out of stock