Configure, Write and Simulate programs in Keil uVision5 for 8051: -
1. Open Keil uVision Software.
2. Go to Project menu then click on New uVision project. Select destination
directory to save the project. Give the project name without any extensions
and click on Save.
3. Search AT89S52/S51/C51/C52 in search box, select the chip then click on OK.
4. Click on NO to “Startup.A51” pop up window.
5. Go to File menu New, again go to File menu Save As.
6. Give the file name with an extension (.asm for assembly language and .C for
Embedded C language), click on Save.
7. Under Project window, expand Target 1 Source Group1 Right click
add existing file to Source Group1. Now select your source file type of
program (.asm for assembly language and .C for Embedded C language).
8. Select your source file, click on Add Close the window.
9. Go to Flash menu Configure Flash Tools.
10. Select Target tab and set the XTAL frequency to 11.0592MHz and click on
Output tab and check Create hex file OK.
11. Write program in the Program window Ctrl + S.
12. Go to Project menu Translate and check Build Output window for any
errors.
13. Go to Project menu Build Target, check Build Output window for
successful generation of hex file.
14. Go to Debug menu Start/Stop Debug Session OK on the pop-up
window.
15. Go to Peripherals I/O ports and select desired input and output ports.
16. Go to Debug menu Run.
17. Simulate the output ports/ pins by changing the input ports/pins.
18. When done, go to Debug menu Start/Stop Debug Session.