HOW TO USE KEIL



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 using the link below.


After successful download and install, you may have problem getting familiar with it. Here I am giving you a tutorial on how to use it for writing your program, compiling it, and finally generating the HEX file.

For familiarizing KEIL, we choose a basic program on LED blinking using 89C51

STEP 1: Create a new file for the project.


Project>New µVision Project

Create a new folder in preferred location and a file with in the folder and save it.

STEP 2:  Select the proper device from the new dialogue box that appeared after step 1.


Atmel>AT89C51>OK

STEP 3: When prompted select YES.



STEP 4: Select File>New for typing the code.


STEP 5: Save the new file with proper extension (eg: led.c).




STEP 6: Right click on the Source group 1 and select Add existing files. Then add the program file to the project workspace.


Target 1>Source Group1 (right click)>Add existing files to source group 1>Add


STEP 7: Right click on Target 1 and select options for target 1.Then set the frequency and enable Hex file generation


Target 1(right click)>options for target 1>target>set xtal (MHz)


Target 1(right click)>options for target 1>output>enable Hex file

STEP 8: Write the code in the saved file and rebuild it.


STEP 9: Open proteus design and select schematic capture.


STEP 10: Select the component mode and pick the components needed.


Component mode (1)>pick devices (2)

STEP 11: Enter the keywords and select the components for the required circuit. Here we need 89c51 and LED to wire up the circuit.



STEP 12: After wiring the circuit correctly, double click on the schematic diagram  opens a new dialogue box. Within the dialogue box, set the clock frequency and select the path of the already written program file.


Double click on the schematic>set the clock frequency>select the program file>OK

STEP 13: Run (within the red circle shows the run button) the simulation and view the output.

Download DOCS
Download keil file here

Comments

Popular posts from this blog

INTERFACING SEVEN SEGMENT DISPLAY WITH 89c51

INTERFACING OF LCD WITH 89C51

POINTERS