Professional Documents
Culture Documents
Keil is a German software subsidiary of Arm Holdings. It was founded in 1982 by Günter and Reinhard Keil,
initially as a German GbR. In April 1985 the company was converted to Keil Elektronik GmbH to market
add-on products for the development tools provided by many of the silicon vendors. Keil implemented the
first C compiler designed from the ground-up specifically for the 8051 microcontroller.
Keil offers an evaluation package that will allow the assembly and debugging of files 2K or less.
2
Steps to write and execute a program in KEIL
3
4. Select New µVision Project from the Project Menu.
5. Name the project ‘mp mc’
6. Click on the Save Button.
4
7. Select the part you will be using to
test with. For now we will use the
AT89C51. .
8. Double Click on the AT89C51.
9. Click OK.
5
11. Click File Menu
and select New.
6
12. A new window will
open up in the Keil
IDE.
7
13. Copy the example to the Right into the new window. 0RG 0000H
MOV A, # 32H
MOV R1, #15
MOV R2, #OE2H
MOV A, R1
MOV R1, A
END
8
14. Name the file mp mc.a51
15. Click the Save Button
9
16. Right click on source group 1 and click on add on existing file.
17. Change file type to Asm Source File (*.a; *.src).
18. Select mp mc.a51
19. Click Add button
20. Click Close button.
10
21. Creating HEX for the Part
22. Click on Target 1 in Tree menu
23. Click on Project Menu and
select Options for Target 1.
11
24. Select Target Tab
25. Change Xtal (Mhz) from 33.0
to 11.0592
26. Select Output Tab
27. Click on Create Hex File check box
28. Click OK Button
12
29. Click on Project Menu and
select Rebuild all Target Files.
30. In the Build Window it should
report ‘0 Errors (s), 0 Warnings’.
31. You are now ready to Program
your Part,
13
32. Click on the File Menu
and select Save.
33. Click on Project Menu and select Rebuild all Target Files
34. In the Build Window it should report ‘0 Errors (s), 0 Warnings’
35. Click on Debug Menu and Select Start/Stop Debug Session.
36.If you use a free version of Keil the dialog appears. Click OK.
14
15