keil tutorial v2
TRANSCRIPT
-
8/12/2019 Keil Tutorial v2
1/12
3
Basic Keil Tutorial
1. Open Keil from the Start menu
2. The Figure below shows the basic names of the windows referred in this document
-
8/12/2019 Keil Tutorial v2
2/12
4
Starting a new Assembler Project
3. Select New Vision Project from the Project Menu.
4. Name the project Toggle5. Click on the Save Button.
-
8/12/2019 Keil Tutorial v2
3/12
5
6. The device window will be displayed.7. Select the part you will be using to test
with. For now we will use the DallasSemiconductor part DS89C450.
8. Double Click on the Dallas Semiconductor.
9.10.
11.
Scroll down and select the DS89C450 PartClick OK
Choose No.
-
8/12/2019 Keil Tutorial v2
4/12
6
Creating Source File
1. Click File Menu andselect New.
2. A new window willopen up in the Keil IDE.
-
8/12/2019 Keil Tutorial v2
5/12
7
3. Copy the example to the Right into the new window. This file willtoggle Ports 1 and 2 with a delay.
4. Click on File menu and select SaveAs
ORG 0HMOV , #55H
AGAI N:MOV P1,MOV P2,ACALL DELAYCPL ASJ MP AGAI N
DELAY:MOV R3, #200
OUTER: MOV R2, #0255I NNER: DJ NZ R2, I NNER
DJ NZ R3, OUTERRET
END
-
8/12/2019 Keil Tutorial v2
6/12
-
8/12/2019 Keil Tutorial v2
7/12
9
4. Change file type to Asm Sour ce File (*. a; *.src).5. Select toggle.a516. Click Addbutton
7. Click Close button.
8. Expand the Sour ce Gr oup 1in the Tree menu to ensure that the file
was added to the project
-
8/12/2019 Keil Tutorial v2
8/12
10
Creating HEX for the Part
1. Click on Target 1 in Tree menu2. Click on Project Menu and select
Options for Target 1
3. Select Target Tab4. Change Xtal (Mhz) from 33.0 to
11.0592
-
8/12/2019 Keil Tutorial v2
9/12
-
8/12/2019 Keil Tutorial v2
10/12
12
Testing Program in Debugger
1. Comment out line ACALLDELAY by placing a Semicolonat the beginning. This willallow you to see the portchange immediately.
2. Click on the File Menu andselect Save
3. Click on Project Menu and select Rebuild all Target Files
4. In the Build Window it should report 0 Errors (s), 0 Warnings
5. Click on Debug Menu and Select Start/Stop Debug Session.
6. If you use a free version of Keil the dialog appears. Click OK.
-
8/12/2019 Keil Tutorial v2
11/12
13
Running the Keil Debugger
1. The Keil Debugger shouldbe now Running.
2. Click on Peripherals. Select I /O Port s, Select Port 1.
-
8/12/2019 Keil Tutorial v2
12/12
14
3. A new window should port will pop up. This represent the Port andPins
4. Step through the code bypressing F11 on theKeyboard. The ParallelPort 1 Box should change asyou completely stepthrough the code.
5. To exit out, Click on Debug Menu and Select Start/Stop Debug Session