Getting Started With Keil Uvision Compiler
Getting Started With Keil Uvision Compiler
Creating applications for 8051 using Keil Vision compiler 1. Starting the Vision IDE: Click on START button and select Programs/Keil Vision. The screen should look something like this. There are 3 different windows viz. Editor window, Workspace window and output window as shown below.
2. To create a new project, from PROJECT menu, select NEW PROJECT. The screen should look something like this.
4. When you create a new project, Vision3 asks you to select a CPU for the project. The select device dialog box shows the Vision3 device database. Select the microcontroller Philips P89V51RD2.
6. To create a new source file either .asm or .c, from FILE menu, select NEW. The screen should look something like this.
8. Once the source file is created, add .asm file to your project. You can select the source group in the project workspace and files and click the right mouse key to open a local menu.
10. After adding the file, go to options for the target to select the proper crystal frequency and Hex file creation. You can select the Target 1 in the project workspace and click the right mouse key to open a local menu.
12. To check the options for creating the Hex file go to output tab of options for target window. Then specify the name of Hex file (default is project name) and check the box to create hex file as shown below.
15. After clicking the start debug session, the screen should look something like this. To view the parallel ports, time/counter, interrupt go to Peripherals Menu. To view the memory window, serial window go to View Menu. To single step press F10.
4. Do proper settings in flash magic (Device: P89V51RD2, COM port: COM1, Baud rate: 9600, Interface: None (ISP), enable erase block used by the HEX file. 5. Click on Verify after programming to verify the program. 6. Very Important: Do not select set security bit, Fill unused Flash, Gen block checksums, Prog Clocks bit. 7. Once the all settings are completed, select the Hex file which is to be downloaded.
9. After selection of the file. Click on the START button. Following message will be displayed.
10. At this point you should power ON the board. If the board is already powered ON, then you should press the reset switch on the board. 11. After the above, the above message will disappear and the programming will start. 12. Finally you will get the message on the bottom of the flash magic screen is finished. 13. To run the program, RESET the board or POWER OFF and POWER ON the board again.