Creating a project in keil (uVision IDE)for 8051
|
Keil tool chain supports many controller families. In this blog we will see how to create a project for 8051 controller. In particular we will be creating a project for AT89C51.
Creating Project in keil :
Select the project- > new uVision project
Once you select ‘New uVision Project’,it will prompt for a project name. Provide a suitable name for your project
After clicking Save, you will be asked to select the controller.(Search for A89c51)
Select your target controller, then press ‘YES ‘ if you are asked to confirm the copy of the ‘STARTUP.A51’ file.
Now the project is ready , but we don’t have any source files associated with our project. To add source files click on ‘Target ‘->’Source group’->’Add New Item….’
Select File Type as ‘C’ and give a filename
Now can start editing the ‘main.c’ file . Add your code in this file.
Now if you click ‘Build’, HEX file will not be created, for that you need edit the ‘TARGET’ option. Right click on ‘Target’ and select ‘Options for Target.. ‘
In ‘output’ tab , check the ‘Create hex file’ option
Now the HEX file will be generated which you can burn to your device.You can see this to know about loading the HEX file to the device.