Thursday, 13 August 2015

HOW TO USE KEIL

HOW TO USE KEIL

Finally you have decided to write your own code for the 8051 microcontroller. It doesn't matter whether you have chosen Assembly or C Language for yourself but what matters now is that you need an environment specially designed for 8051. Basically you are looking out for IDE (Integrated Development Environment) that will help you build and compile programs. While there are many options out there, I prefer KEIL uVision in this regard.




KEIL IDE is basically an assembler and a compiler or whatever you name it. You can write either an Assembly or C language code and KEIL will take care of the rest for you. Furthermore, it supports many of the 8051 variants that you will face. You can download KEIL from their official website using the link below.


After successful download and install, you may have problem getting familiar with it if you're using it for the very first time but don't worry because I am here to give you a graphical tutorial on how to use it for writing your program, compiling it, and finally generating the HEX file.

Here we go


PROJECT > NEW uVISION PROJECT

Give some name and click SAVE

when prompted, select proper device that you're using ( i-e ATMEL > AT89C51 )

When prompted, select YES

Click NEW button and write your code (Assembly or C language)

SAVE the file with proper extension as above


Right click SOURCE GROUP 1 as shown


Go to options for the project

Enable HEX file generation

Build the project

Use this HEX file to program your IC

These are the simple steps for a successful compilation and generation of HEX file. Now I hope you have created your first HEX file and ready to program it to the 8051. And you know how to do that, right? If your answer is no then please check this out.

UPDATE:

If you have trouble understanding the pictures then here is a video of the same process that I made. Hope you get a better view this time

No comments:

Post a Comment