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

Keil_8051_new_project

Once you select ‘New uVision Project’,it will prompt for a project name. Provide a suitable name for your project

 

Keil_8051_Project_name

After clicking Save, you will be asked to select the controller.(Search for A89c51)

Keil_8051_controller_selection

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….’

Keil_8051_Add_new_item

Select File Type as ‘C’ and give a filename

Keil_8051_Add_new_Source_file

Now can start editing the ‘main.c’ file . Add your code in this file.

Keil_8051_edit_source

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.. ‘

Keil_8051_add_target_options

In ‘output’ tab , check the ‘Create hex file’ option

Keil_8051_hex_file_generation

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.

Add a Comment

Your email address will not be published. Required fields are marked *