KeiluVision5 installation guide

How to install KeilµVision5 for 8051 Microcontroller for your Study?

This article will help you How to install KeilµVision5 for 8051 Microcontroller for your Study. If you have any problem during the installation, you can watch these videos for detailed explanation.

Keil µVision5 is a widely used integrated development environment (IDE) for programming microcontrollers, including the 8051 family. It offers tools for writing, compiling, and debugging embedded applications. This guide will provide a step-by-step procedure to install Keil µVision5, customize it for 8051 microcontrollers, and demonstrate its use with an example.

Introduction

The 8051 microcontroller, developed by Intel, is a versatile and widely used microcontroller for embedded systems. Programming the 8051 requires an efficient IDE like Keil µVision5, which simplifies the development process with a user-friendly interface, powerful debugging tools, and comprehensive libraries. This guide will walk you through the installation process, customization for 8051, and how to write and test a simple program.

Step 1: Installing Keil µVision5

1.1 System Requirements

  1. Operating System: Windows 7 or higher
  2. RAM: Minimum 2 GB
  3. Processor: 2 GHz or higher
  4. Hard Disk Space: At least 1 GB free

1.2 Download Keil µVision5

  1. Visit the official Keil website by clicking this link: https://www.keil.com
  2. Read more about KeiluVision 5 on this link.
  3. Navigate to the Downloads section and select µVision5 IDE.
  4. Download the installer (MDK-Arm.exe), which includes support for multiple microcontrollers, including 8051.

1.3 Install Keil µVision5

  1. Run the downloaded installer as an administrator.
  2. Accept the license agreement and click Next.
  3. Choose the installation directory (default is recommended).
  4. Follow the on-screen instructions to complete the installation.
  5. Restart your computer after installation for the changes to take effect.
  6. For visual guide watch this video.

Step 2: Customizing Keil µVision5 for 8051 Microcontroller

2.1 Install 8051 Device Support

  1. Open Keil µVision5.
  2. Go to Project > Manage > Pack Installer.
  3. In the Device tab, search for 8051.
  4. Select the appropriate microcontroller (e.g., AT89C51, AT89S52) from the list.
  5. Click Install to download and install the 8051 support package.

2.2 Configure a New Project

  1. Go to Project > New µVision Project.
  2. Choose a location and name for your project.
  3. In the device selection window, search for and select your 8051 microcontroller (e.g., AT89C51).
  4. Click OK to create the project.

2.3 Add Startup Code

  1. Keil may prompt you to add a startup file. If available, select Yes to add the default startup file.
  2. If not prompted, you can manually add a startup file by navigating to Project > Add Files to Group ‘Source’ and selecting the file.

Step 3: Writing and Testing a Program

3.1 Writing a Simple LED Blinking Program

  1. In the project window, right-click on Source Group 1 and select Add New Item to Group ‘Source’.
  2. Choose C File (.c), name it (e.g., led.c), and click Add.
  3. Write the following code in the editor:
#include <reg51.h> 

sbit LED = P1^0;  // Define LED connected to P1.0 

void delay_ms(unsigned int ms) { 
    unsigned int i, j; 
    for (i = 0; i < ms; i++) 
        for (j = 0; j < 1275; j++); 
} 

void main() { 
    while (1) { 
        LED = 1;  // Turn ON LED 
        delay_ms(500); 
        LED = 0;  // Turn OFF LED 
        delay_ms(500); 
    } 
}

3.2 Compiling the Program

  1. Save the file (Ctrl + S).
  2. Go to Project > Build Target or press F7.
  3. Check for any errors in the Output Window.

3.3 Creating a HEX File

  1. Navigate to Project > Options for Target ‘Target 1’.
  2. In the Output tab, check the box labeled Create HEX File.
  3. Click OK and rebuild the project.
  4. The HEX file will be generated in the project folder.

Step 4: Testing the Program

4.1 Simulating in Keil µVision5

  1. Open Debug > Start/Stop Debug Session.
  2. Use the Peripherals menu to open and observe registers and I/O pins.
  3. Run the program using the Run button or press F5.
  4. Monitor the LED state changes on the simulated ports.

4.2 Flashing the HEX File to Hardware

  1. Connect your 8051 microcontroller to the computer via a programmer (e.g., USBASP).
  2. Use programming software (e.g., ProgISP) to load the HEX file onto the microcontroller.
  3. Power the hardware and observe the LED blinking.

Conclusion

Keil µVision5 is a powerful IDE for 8051 microcontroller programming, offering seamless integration of writing, compiling, debugging, and testing. By following the steps above, you can effectively use Keil µVision5 to develop and test embedded applications. Customizing the IDE for your specific microcontroller and understanding its debugging tools can significantly improve your development process.

Dr. Dattaraj Vidyasagar
Dr. Dattaraj Vidyasagar

M.S. Electronics & Telecomm. (Cleveland Institute of Electronics, Ohio), Associate Member (IETE, Kolkata), Panelist on Dr. Homi Bhabha Foundation, Google certified educator (Level-1), Mentor of Change (MoC-1619) Niti Ayog, Government of India, International Robotics Trainer, Veteran of Applied Electronics since 35+ years.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x