Summary of STC MCU Program Download Failure Problems

Publisher:Yuexin888Latest update time:2018-11-20 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

 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:


1.jpg

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):

3.jpg

USB-TTL small board (usually using PL2303 chip):

4.jpg

USB-TTL circuit diagram:

5.jpg


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

6.png

After installing the driver, connect the USB to TTL chip to the device manager (the following screenshot is from Win7 system):

7.png


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.


Reference address:Summary of STC MCU Program Download Failure Problems

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?

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号