STC is a domestically produced 51 single-chip microcomputer launched by Hongjing Company. Its advantages are low price, powerful functions and easy use. In particular, its serial port ISP program download method is convenient for a large number of users and eliminates the need to purchase expensive programmers. It is very suitable for entry-level learning of single-chip microcomputers.
However, beginners often encounter situations where the program cannot be downloaded. Many people even give up learning because of this, which is a pity. Here we summarize the common causes of errors, judgment methods and solutions.
The hardware required for STC microcontroller download program is mainly divided into three parts:
Microcontroller minimum system, download circuit, and computer terminal.
Download failure can generally be solved from these three aspects.
If you have or can borrow from someone else a computer that can download programs normally, a microcontroller download cable, and a development board, you can quickly find out where the problem lies by controlling the variables.
1. You can connect your development board to a computer that can download normally and download. If you can download, it means the problem lies with your computer.
2. Then connect the normal development board to your computer and download it. If you can download it, you can judge that your computer is normal and the problem is with the development board.
3. Of course, you can also replace the MCU on the development board to determine whether your MCU is damaged. This will quickly solve the problem.
If there are no such conditions, you can judge one by one from the following possibilities (the red font indicates the more common problems).
1. Minimum System Problem
1. If it is not an STC series microcontroller, but an AT or other brand microcontroller, the download method is different from that of STC.
2. The MCU is damaged. For example, due to an error in the ISP system boot code, some MCUs can run previously downloaded programs but cannot download programs; or the MCU is damaged (usually a damaged MCU cannot be seen from the outside and can only be determined by replacing it with a normally working MCU).
3. Crystal oscillator problem, such as: there is no crystal oscillator, the crystal oscillator has poor contact when placed in the socket, or the pins are too long to oscillate.
The minimum system circuit diagram is as follows, which consists of a power supply, a single-chip microcomputer, a reset circuit, and a crystal oscillator clock circuit:
STC89C52RC MCU:
2. Download circuit problem
1. The downloaded chip is damaged (the chips generally involved in the download are PL2303, CH341, MAX232).
2. The crystal oscillator of PL2303 is not 12M.
3. The USB interface is loose, the download line is broken, etc.
4. Wiring error, such as: TXD and RXD are connected in reverse.
MAX232 circuit diagram (used to realize serial port level conversion):
USB to serial port (usually using CH341 chip):
USB-TTL small board (usually using PL2303 chip):
USB-TTL circuit diagram:
3. Problems on the computer side
1. Regarding software downloading, it is best to use the latest version of STC_ISP. In Win7 system, you may need to run it as an administrator.
2. Driver installation problem: If there is a COM port "USB-to-Serial" in the device manager and there is no yellow exclamation mark, there is generally no problem with the driver, but you can still reinstall the driver to see; the installed driver must correspond to the system (Windows 7 32-bit, 64-bit or Windows XP).
3. The COM port is set incorrectly. Generally, when downloading, the STC-ISP software will prompt that the serial port cannot be opened (the selection of the COM port should be checked in the port number in the device manager).
4. The model of the microcontroller is set incorrectly. Generally, when downloading, the STC-ISP software will prompt that it is not this model of microcontroller.
5. The baud rate is too high. It may be helpful to lower it appropriately. Select 1200 for both high and low baud rates. (This is quite common. Some versions of STC-ISP have such problems.)
STC-ISP Software
After installing the driver, connect the USB to TTL chip to the device manager (the following screenshot is from Win7 system):
4. Problems with operation steps
Note that you should click the download button on the computer before powering on the microcontroller; or click download on the computer, turn off the power of the microcontroller and then turn it on again.
The download procedure sequence is as follows:
1. Set the MCU model, COM port, baud rate and other parameters.
2. Load the microcontroller program to be burned.
3. Click "Download".
4. Power on the microcontroller.
5. Download software display: Downloading....
6. Download complete.
5. Appendix: Tips given by STC_ISP software for download failure
1. When the MCU is powered off, click the download button and then power on the MCU.
2. Stop downloading, reselect the RS-232 serial port, and connect the cable
3. You may need to short P1.0/P1.1 to ground first.
4. The external clock may not be connected
5. The clock does not oscillate due to the long leads of the PLCC and PQFP converters. Please adjust the parameters.
6. You may need to upgrade the STC-ISP.exe software on your computer
7. If it still fails, there may be no ISP system boot code in the MCU/single-chip microcomputer, or it may need to be returned for upgrading, or the MCU may be damaged.
8. If you use a USB to RS-232 serial cable to download, you may encounter incompatibility issues. You can ask us to help you purchase a compatible USB to RS-232 serial cable.
6. If conditions permit, you can check according to the following steps
1. Check whether the microcontroller is an STC series, whether it has a crystal oscillator, and whether there is an error in the minimum system circuit (if the development board used was able to work normally before, the minimum system circuit is generally not wrong).
2. Check the serial port settings and operation steps (download first and then power on).
3. Change the serial port (for desktop computers with serial ports) or change the USB port.
4. Restart the download software and try again.
5. Restart your computer.
6. Change to the latest download software (download from Hongjing official website).
7. Reinstall the driver (if it is a desktop computer with a serial port, no driver is required if it is directly connected to the serial port).
8. Change to other microcontrollers.
9. Change the download cable.
10. Change to another computer.
Previous article:Characteristics of the main function for beginners of single-chip microcomputer programming
Next article:How to operate 16-bit INT data in an 8-bit microcontroller?
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Check out the exclusive disassembly document! How do TWS earphones achieve hands-free and voice wake-up control?
- Shenmu Android Face Recognition SDK Compilation Instructions
- C6678 multi-core DSP development - several key issues of hello world
- For example, #35: #error directive "Not supported." What is the reason? Please give me some advice.
- First time drawing board, newbie help
- Heart rate and blood oximeter chips are welcome to be added! If you have sensors or chips for thermometers and blood pressure meters, please add them too.
- What makes UWB different?
- How to determine which MSP430 is right for your LCD application
- 51 to 32 for beginners in embedded systems?
- C6000 DSP Work Summary