STC microcontroller uses serial port ISP, which does not require a programmer. As long as there is a serial port, it can be downloaded, which is very convenient.
However, from a large number of actual operations, various download problems will be encountered, which affects the user experience. The reasons and solutions are summarized as follows:
(For reference only, welcome to correct, Email: stcisp@163.com)
First of all, the conditions for successful ISP programming are very simple, as long as there is a serial port and a microcontroller connected to form a minimum system (with RS232 circuit) (see the data sheet for details). Some USB dedicated downloaders (such as those using the CH340T chip) directly output TTL level and do not require a 232 circuit.
In fact, the unsuccessful download is nothing more than a problem with the microcontroller itself or the download environment. We can use the replacement method to check where the problem lies.
The test platform is recommended to use the native serial port of the desktop + 32-bit WINXP (64-bit may not be compatible enough) + the original MAX232 (SP232) chip (3.3V system requires MAX3232) + the minimum system of the microcontroller.
(Note: The simplified version of WINXP of some users may not be complete due to incomplete components, which may cause the STC-ISP software to not run properly or errors)
1. First check whether the minimum system connection is normal, whether there is a short circuit, open circuit, or poor contact. (Special note: After burning and clicking the programming button, the microcontroller must be powered off for cold start!)
2. Check whether the voltage is stable and correct (not too high or too low, F series is 5.0V, L series is 3.3V, W series is a wide voltage of 3.3-5.0V).
3. Try to lower the download baud rate of STC-ISP and adjust the minimum and maximum baud rates to be consistent (for example, both are selected as 4800BPS).
4. Check whether P1.0/P1.1 (15F series: P3.2/P3.3) was selected as 0 for downloading last time, and it was not pulled down to a low level this time.
5. Check whether the STC-ISP download option selected the use of an external crystal oscillator last time, but the external crystal oscillator is not connected this time or the oscillation circuit does not work.
6. Is there any influence from external circuits (for example, external RS485 and other circuits will interfere with the serial port).
7. Check whether the delay setting of STC-ISP download option is correct (it is recommended to check "Use longer delay for power-on reset").
8. Is the 232 level conversion circuit in good condition? (3.3V system requires MAX3232, please use the original genuine product, some domestic chips are unstable. It is also strongly recommended not to use the cheap 232 circuit with 2 transistors) (If you use some USB dedicated downloaders with TTL level output (such as CH340T chip), you do not need a 232 circuit).
9. If you use a USB cable to convert to a serial port cable, pay attention to the quality of the USB cable. It is recommended to use a cable with a CH340T chip. (There are many counterfeit PL2302 chips, so you need to find a suitable driver. The latest driver may not be the best.)
10. Some USB to serial port cables will power the microcontroller through the RxD/TxD pins, resulting in the inability to completely power off during downloading. Try inserting a 1K resistor in series with the serial port RxD and TxD pins or installing a switch to ensure that the microcontroller can be completely powered off and cold started. (Note: If the USB to serial port chip is on the same board, do not power off the chip, otherwise the USB to serial port will disappear)
11. Check whether the reset is bad
12. For early versions (before 2010-10-18) of STC15F104E/204E, please use STC-ISP V1.06 to download. For later versions, it is recommended to use STC-ISP V6.53 and above (STCISP V4.83/V4.88 is recommended only for early offline download boards).
The frequency adjusted by the 13 and 15 series microcontrollers is too high, exceeding the nominal value (for example, 40MHZ), resulting in the failure of the software frequency adjustment timeout (please adjust within the highest frequency indicated by the chip model, such as 25MHZ and 35MHZ, etc., do not overclock).
14. If the chip is damaged or defective (due to overcurrent, overvoltage, burnout, or ISP CODE loss, etc.), please replace another chip and try again.
--------------------------------------------------------------------------------
ISP programming failure actual case
1. Phenomenon: The customer failed to program ATMEL AT89S52 using STC-ISP V4.83.
Solution: STC-ISP can only program STC microcontrollers. For other brands of microcontrollers, please use their dedicated software or supported programmers.
2. Phenomenon: When downloading STC-ISP software for STC12C5A60S2, the prompt "Detecting MCU..." appears.
Solution: Check the power supply voltage and it is 4.25V. The user uses the USB port for power supply. The large internal resistance of the wire leads to a large voltage drop. After replacing the high-quality USB cable, the voltage is 4.85V and the problem is solved.
3. Phenomenon: When using STC-ISP V4.83 + STC official download board (V3.0) to download STC12C5A60S2, there is no response.
Solution: After inspection, the customer selected the voltage jumper to 3.3V, and the microcontroller power supply was insufficient, resulting in download failure. Reset the jumper to 5V and the download was successful.
4. Phenomenon: The user said that all the STC12C5A60S2 chips can only be burned once, and they will be "broken" the next time they are used, and cannot be downloaded! ! !
Solution: The minimum system made by the user is a circuit without a crystal oscillator, but the download option of STC-ISP selects "Use external crystal oscillator next time", which causes the MCU to fail to download because it cannot work without a clock. You can add an external crystal oscillator circuit.
5. Phenomenon: The user said that all the STC12C5A30S2 chips can only be burned once, and they will be "broken" the next time they are used, and cannot be downloaded! ! !
Solution: The user selected the download option of STC-ISP "Download only when P1.0/P1.1 is 0/0 at the next cold start", but the actual download did not pull down, resulting in download failure. Just ground the two pins (Note: Pay attention to the download options of STC-ISP, understand the usage of each parameter, and make appropriate choices).
6. Phenomenon: The chip model is "STC15F2K61S2", but the corresponding model cannot be found in STC-ISP during downloading. When using IAP15F2K61S2, it prompts "wrong model".
Solution: After contacting the manufacturer, it was found that this is an early chip and the model was printed incorrectly. It should be STC15F2K60S2. After selecting this model, the download was successful.
7. Phenomenon: The download of STC12C5A32S2 on a certain 51 development board is unstable, with a low success rate. Sometimes, even if the baud rate is reduced, it still cannot be downloaded, and the prompt "Unable to find the microcontroller" is displayed
. Solution: Through the replacement method, it is found that another microcontroller development board can be used for normal download. Finally, the domestic MAX232 chip (DIP package, with socket) on the original development board is replaced with a genuine SP3232 chip to solve the problem (sometimes the performance of the external capacitor is poor and such a fault may also occur). (It is recommended to use the official download board of STC as the minimum benchmark system platform).
8. Phenomenon: A certain development board can download the traditional STC microcontroller normally, but there is no response when downloading IAP15F2K61S2 by flying line.
Solution: After careful inspection, the user made a low-level mistake and swapped RXD, TXD with P3.0/P3.1, which caused the download to fail. After correction, the download was successful immediately.
9. Phenomenon: The CP2102 chip USB to serial port line downloads, and the microcontroller does not respond.
Solution: After checking with an oscilloscope, the serial port timing and level performance are poor. After replacing the serial port line of CH340T, it succeeded.
10. Phenomenon: The user has been using STC15F104E for online download without any problems. Later, he switched to another batch of chips and the download success rate was very low. The customer always thought that the download environment had not changed.
Solution: After investigation, although the characteristics of the MCU are within the range of the data sheet, some characteristics are different. After checking "Use a longer delay for power-on reset" in the "Download Options" of the STC-ISP software, the download is successful.
11. Phenomenon: The user used a USB to serial port dedicated downloader, which had been working normally before. However, one day, the download of STC15F2K61S2 suddenly failed, and STC-ISP prompted "no response to frequency adjustment".
Solution: Use the replacement method to check, and the native serial port + RS232 circuit can be used for downloading. Cold start the computer, uninstall and reinstall the driver of the USB to serial port downloader to solve the problem.
12. Phenomenon: STC12C5A60S2 download has no response, but the previously downloaded running light test program can run normally.
Solution: It is understood that the user used a third-party SP300 programmer to download the chip last time, and then could not download it with STC-ISP. After investigation, it was found that the programmer had destroyed the ISPCODE code of the STC chip and could no longer download the serial port (Comment: It is recommended to use the original STCISP to download the STC microcontroller, and it is not recommended to use other programmers).
13. Phenomenon: STC12C5A08S2 download has no response
Solution: After investigation, the customer selected "Use external crystal oscillator next time" in STC-ISP, but the actual download environment crystal oscillator uses a socket. Check that one foot of the socket is poorly soldered to the PCB, and the oscillation circuit does not work. After re-soldering, the download is normal.
14. Phenomenon: The user manually built a minimum system using a perfboard, but the download failed. Chip used: STC89C52RD+.
Solution: After investigation, the customer used a low-quality switching power supply, which was unstable and had poor filtering. The problem was solved after replacing a high-quality power supply.
15. Phenomenon: When downloading IAP15F2K61S2, it always stays at the "adjusting frequency" stage.
Solution: After checking, the user's chip model is "IAP15F2K61S2-25I-PDIP40", and the maximum operating frequency is 25MHZ, but the user manually set the operating frequency to 40MHZ (overclocking). For stability, it is normal to use the nominal frequency.
16. Phenomenon: IAP15F2K61S2 (2013 version C), the download setting frequency is 15MHZ, but the actual frequency is 14.2MHZ, which is about 10% offset!
Solution: After consulting the manufacturer, the chip can only be adjusted to an error of less than 0.3% at the commonly used frequency points, and some uncommon frequency points will have a larger error. It is normal after using the commonly used frequency.
17. Phenomenon: If the IAP15F2K61S2 download exceeds 30MHZ, it will not be able to download no matter how it is set. It is either unresponsive or stuck in "adjusting frequency" for a long time. However, it can be downloaded normally the next day (below 30MHZ). I can't figure it out!
Solution: Later, the word "BATEA" was found in the model on the front of the microcontroller, indicating that this is a sample (it should be the original sample, and it is estimated that it was not sold directly). Sample version A may have various unstable situations, which have been corrected in subsequent versions B and C.
18. Phenomenon: The user needs to download the "STC15F104E" chip, but the STC-ISP software MCU model drop-down menu and the "Open Program File" button are both gray, the model is fixed to "IAP15F2K61S2" and the HEX file cannot be read and burned. I have changed several computers and the same is true under WINXP and WIN7.
Solution: After consultation, the version number in the upper left corner of the STC-ISP used by the customer is displayed as V6.31. In fact, this is a self-released version, defined as "IAP15F2K61S2" and HEX is built-in. Reason: The interface of this version is the same as the released version, which leads to misunderstanding. In subsequent versions, the manufacturer has clearly distinguished the interface from the normal version, and the title can be customized. Switch to the latest version of STC-ISP software (for example, V6.57) and "get it done"! :)
19. Phenomenon: (Web excerpt) The user has been using the USB to serial port downloader (shaped like a U disk) purchased online to download normally. One day, a similar USB downloader used by a classmate at school could not download, and the prompt "Detecting the target microcontroller" was displayed, but the serial port self-test was normal.
Solution: After investigation, the user's original downloader model was HT1032, which had a built-in automatic cold start function. The school's model did not have an automatic cold start function, resulting in download failure. The STC microcontroller must be cold started to enter the ISP state. Later, the user manually flipped the switch to cut off the power, and the download was successful! (Note: STC microcontroller downloads must be cold started, which is different from the ARM and other burning methods. It is also very convenient after getting used to it.)
20. Phenomenon: STC12C2051 (internal firmware version: 3.6D), the latest version of STC-ISP V6.57 failed to download, prompting "This version of MCU is not supported for burning".
Solution: Use traditional STC-ISP V4.83/V4.88 to burn successfully. (Note: STC-ISP V6.XX does not support burning of some old MCUs with low firmware versions)
21. Phenomenon: The corresponding model cannot be found when programming STC15F12AD in PDIP40 package.
Solution: This version is an early sample, only for testing, not mass production, and can be programmed using STC-ISP V4.82.
22. Phenomenon: STC89C52RC can be downloaded on the development board, but IAP15F2K61S2 cannot be downloaded by jumping the wire, and the message "Handshaking..." is displayed.
Solution: After inspection, it was found that the USB cable used by the user was unstable. After replacing it with a Taiwan Litte brand (recommended) USB cable (FT232 chip) and downloading and installing the latest driver, the download was successful (Note: Because STC-ISP has strict requirements on serial port timing and level, some low-cost USB serial port cables cannot meet the requirements, resulting in download failure).
23. Phenomenon: STC15F204EA (SKDIP28 package), no response when downloading.
Solution: It is found that this batch of chips is an early version (before 2010-10-18), download STC-ISP V1.06 from the official website to solve the problem (Note: the new and old versions are incompatible and cannot be mixed, this requires special attention).
24. Phenomenon: When downloading IAP15F2K61S2, it prompts "Download failed".
Solution: It is found that STC-ISP V6.39 is used. Try to download the latest STC-ISP V6.53 and above from the official website and try again. The burning is successful (Note: The firmware version of some new chips is 7.1.3S and above and also requires the new version of STC-ISP software to burn).
25. Phenomenon: STC-ISP V4.83 fails to install on 64-bit WIN7, prompting "...control not installed".
Solution: Since the new version of STC-ISP already supports programming of the entire STC microcontroller series, the problem can be solved by downloading the new version of STC-ISP V6.53 from the official website. (Note: For some old STC microcontroller models with lower internal firmware or older offline programmers, STC-ISP V4.83 is still required. Controls and control registration tools can be downloaded from the STC website)
Comments: Generally, mass-produced chips are tested, and R&D should not be impetuous. When the problem of downloading and burning cannot be solved, generally look for the reasons from the download environment and settings, and I believe it can be solved. As long as you are careful and patient, use analysis and substitution methods, you can basically download successfully, and accumulate experience at the same time! When you can burn enough STC microcontrollers and understand their characteristics, you will be able to solve problems easily. I wish you a happy use! :)
Previous article:How to make your own BootLoader for STM8 and implement online upgrade
Next article:STM8L Temperature Sensor DS18B20
- 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
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- AVCC and AVSS issues with MSP430FR2355?
- 【N32L43x Review】OLED Displays Temperature and Humidity Data
- Method of flash programming in LPC2000 series microcontroller
- A Review of Low Power Design Technology
- [Dialogue with forum members] My main focus now is to find chips, buy them first and then develop them
- NXP MKL26 error when downloading during debugging..
- Introduction to the method of board-level online compilation and downloading of C6000 DSP code
- Cadence Circuit Design Case Analysis
- Tiny technology, global impact: Breakthrough TI BAW resonator technology creates a new electronic heartbeat
- Field Effect Transistor Basics and Application Practice