Step 1: Install the development tools
I downloaded Keil 4 (MDK) according to the book, but encountered various problems and could not install the STC series products. I calmed down and thought about it, changed my mind, and re-downloaded the development tool, keil C51. The regular download link is: https://www.keil.com/download/product/ , select C51. If you can't download it, there is another link at the end of this article.
After installation, you need to register, open keil, select File - Liscense Management, copy the CID, enter the CID in the registration tool, click "Generate", copy the generated serial number to the New Liscense ID Code dialog box in the "Liscense Management" form, then click "Add LIC", and the registration is successful.
Step 2: Import STC product library
Download STC-ISP, http://www.stcisp.com/ . After opening the software, select "Keil Simulation Settings", click "Add Model and Header File to Keil to Add STC Simulator Driver to Keil", and follow the prompts.
Step 3: Create a new project
In Keil, "Project - new uVision Project", fill in the project name, and in the target device dialog box, select the target microcontroller.
After the project is established, create a new file, enter the code, and save it as "XXX.c" with the .c extension.
Then right-click "Source Group1", select "Add Existing Files to Group 'Source Group 1'", and add the code file saved in the previous step.
Step 4: Generate HEX file
Click the "Options for Target" button in the toolbar.
In the pop-up dialog box, set the crystal oscillator (Xtal) to 12Mhz
In the Output tab, check Create HEX File
After saving, click the "Rebuild" button and observe the output information. If there is no error prompt, it is successful.
The generated file name is "project name".hex
Step 5: Burn the program to the development board
Open STC-ISP, click "Open Program File", select the hex file generated in the previous step, connect the development board to the computer, and set the serial port number.
Click "Download/Program" and the program will be burned to the lower computer.
If the software gets stuck at the step "Detecting target MCU...", don't panic. You can complete the process by powering on the development board again.
As written in the previous program, the light of P1.0 is on.
Development tool download: https://download.csdn.net/download/zhouyingge1104/10991154
Previous article:Function pointers in C51
Next article:PCON Register Experiment Report
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- cc2531-usbDongle communicates with PC (similar to serial port debugging assistant)
- PCB grounding design specifications worth seeing!
- Serial port screen selection sharing
- How to modify the servo arm? ! ! Please help! !
- Can you guys give me some suggestions, and diagrams?
- The running light delay is realized by the single-chip timer, and the running light style is changed by external interrupt
- Implementation of a Super-resolution Direction Finding Algorithm for Spatial Spectrum Estimation Based on High-speed DSP Series Processors
- IAR FOR MSP430 V7 simulation problem, please solve
- IR2104 drive circuit HO no waveform
- TI C6000 CodecEngine integrated algorithm core calling principle