Getting Started With Keil & setting up a working environment for 8051(AT89c51)[mdk Uvision 5]

Keil Uvision 5 is an application (compiler) which can be used to write a program and generate a hex file which can be burned into a microcontroller. Keil also provides the simulation so you can directly get an idea whether you are having a working code or not.

Latest Keil software can be downloaded from there website: Download from here . FIll the form and download it and install it on your pc.

Steps to be followed to setup Keil Uvision

STEP1: After Installing Open Keil Uvision5 and go to Project From the topmost bar and select New uvision project. Give any name to your project and save it.

 

MAKE NEW PROJECT

STEP2: In search type at89c51 and select AT89C51. Tick the box which states extended linker instead of Bl51. Click Ok and click yes to copy startup files.

STEP2

STEP3: You can see a Project window at the left side of the screen. Right click on Target and go to options. In target Select xtal frequency as 11.0592 or 12 whichever crystal you want to use generally 11.0592Mhz frequency is used. Switch the tab to output and tick the create Hex file box. Click on Ok to apply the changes.

STEP-3
STEP3-1

 

 

 

STEP4: Press ctrl+N to create new file. A blank document will open and save it as ‘your_name’.c. I am naming it as 89c51.c . Dont foreget to add .c at the end of the name. It indicates that it is a c file and you are going to write a code in c language.

STEP4

STEP5: Now at the right side of the scree in project menu click on ‘+’icon besides the target which shows further menus of target and then right click on source group1 and select add existing files to group. Now select your c file which you have saved in STEP4 and then click on ADD and then close. Now you have successfully created a c file and you have added it in your project

STEP-5

STEP6: Now type your code in the file. After writing your code you have to verify it and check for errors. So press F7 to build target.

STEP6

After pressing f7 you can see a window at the bottom of your screen showing details of your build. If there are no errors Hex file be created and the Hex file can be burned into your microcontroller.

STEP6-1

This is how you can setup your keil for any microcontrollers. Keil has support for most of the microcontrollers.

Thank You!!

Learn and Explore

 

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here