Using the new software programming keil MCU 51 works to achieve the first light LED lamp

tool:

windows 10, proteus7.8, keil 4

The main steps:

1.keil programming software (installation method can refer to my previous two blog) regulations, we must first build the project. Click on the menu bar inside project button and select the new uvision project ... option as:

2. Create a new project called example, stored in the desktop firstproject folder. Select the location of the new firstproject Desktop folder, enter example project name. The new project called example, the project name can be arbitrary. The project can be saved in any location. Here firstproject built a name for the folder, for example to save the project-related documents, as:

3. After more than a new file, save firstproject folder, select the item microcontroller chips. Select Atmel, Atmel + symbol before clicking, sliding drop-down box to select "the AT89C51" click "the OK", and finally a pop-up dialog box, clicking "YES", as shown:

4. Click on the software upper left corner of the menu "file", select "new", create a new folder. Then click on the menu "file", select "save", save the new file. Pop "save as" dialog box, select the save location, named "example_led.c" (file name can be arbitrary, not the best Chinese, but it must be ".c" as a suffix), as shown:

5. In the English input, the software program input in the following procedure, as shown:

 

6. The above procedure after entering into the software, after checking the correctness, click on the upper left corner of the software, " " Click and build out to ensure that the output is "0 error, 0 warning", as shown:

 

"Target 1" 7. Click Software on the left side of the window poject folder, the pop-up option box after right mouse button and select "option for target target 1 ..." pop-up "option for target target 1 ..." dialog box , select the "debug" option to select the second "use", and click on the right side of the "settings" select "keil monitor --- 51 drver",

In the "target setup" dialog box, port selection bar at the port "com3", baudarte bar at the baud rate selection "115200", the other unchanged, click "ok", as shown:

8. simulation, we find the previously downloaded "" Embedded C Programming Language "total circuit map", which opens the "example.DSN" circuit simulation project, double-click the MCU, select the program before we write "example.hex" click OK, and then click on the lower left corner of the "start" button to start loading simulation, LED1 lights up, success. As shown below:

Guess you like

Origin www.cnblogs.com/yozora/p/11545201.html