A brief record of a solution to a small problem of CH340T

Publisher:rocky96Latest update time:2015-08-21 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
A few days ago, I made a single-chip microcomputer board, which was powered and downloaded by USB. The chip is CH340T. The driver is easy to find and use.
After soldering this part on the board, there is no problem. Downloading and serial communication are also normal (it is all done according to the official documentation, how can it not be normal)
 
But there are some abnormalities. If there are too many peripheral devices, the program cannot be downloaded. During cold start, the serial port will always restart to recognize CH340T once.
 
I previously suspected that the voltage was unstable, and was planning to add a diode to prevent the rear stage from affecting the front stage, but I couldn't figure out where to add it.
 
Now I see someone has the same problem, I'll mark it and try to modify it in the next version of PCB.
 
It has been tested and is available! This is how I will learn from experience in the future.
key point:
MCU_RXD——+IN4148-——CH340_TXD
MCU_TXD——300Ω——CH340_RXD
The Vcc end of ch340 needs to add 10uf voltage regulator (100uf is also seen), 0.01uf filter

If there is no diode, the power will not be completely cut off and downloading will not be possible.
If there is no 10uf voltage regulator, the microcontroller will absorb a large current when it is loaded with a lot of loads, and the VCC end of CH340 cannot be stabilized at 5V (drops below 4.5V), making it impossible to download.



A simple solution to a small problem of CH340T (download failed due to restart during cold start)


Others say it is the TXD leakage current problem of CH340T
Just connect a Schottky diode (such as 4148, 5819) in series, of course, you can also connect a resistor in series (TX connects a 5K resistor in series to the RX of the target microcontroller, but the transmission rate will be affected, but it does not affect the use), but the best is to connect a diode in series.
The reason is that the USB power supply is unstable. When the microcontroller pulls the voltage during cold start, the ch340T will restart, causing the download to fail.
I also thought of this problem at the beginning, and also connected capacitors in series, but the two capacitors in parallel are counterfeit. . .
Today I got a ruby ​​from the company and it works .
 
A simple solution to a small problem of CH340T (download failed due to restart during cold start)
 
 
The solution given by STC is
A simple solution to a small problem of CH340T (download failed due to restart during cold start)
 
 
I also saw the real thing (no need to cold start the downloader)
Two diodes were added.
 
 
 
 

It is worth mentioning that when using CH340, there are some issues that need to be paid attention to, because many students reported that the program failed when using CH340, but in fact it is generally easy to solve. I have summarized three common reasons:

        1. Some of the CH340 pins supply power to the MCU, causing the MCU to not be completely powered off (downloading the program requires powering off and restarting), which results in the inability to download the program. Solution: Connect a diode in series with the TXD pin of the CH340 (Schottky diode is recommended) and a resistor of about 300 ohms in series with the RXD pin of the CH340. In this way, the MCU can be completely powered off and the problem is solved! ! (Special note: This situation does not apply to chips such as stm32)

        2. When some students power the microcontroller, in order to prevent the reverse connection protection circuit, they connect a diode in series at the power supply. Due to the forward voltage drop of the diode, the microcontroller is underpowered, which makes the program unable to download. Solution: Replace the diode with a 0 ohm resistor or use a diode with a very small forward voltage drop to ensure the normal power supply of the microcontroller. Problem solved! !

              3. Some students carelessly connected the TXD pin of CH340 to the TXD pin of the microcontroller, and the RXD pin to the RXD pin of the microcontroller. Naturally, they cannot download the program. Needless to say, one receiving and one sending. Haha. Solution: Connect the TXD pin of CH340 to the RXD pin of the microcontroller, and the RXD pin to the TXD pin of the microcontroller. Problem solved! !


Reference address:A brief record of a solution to a small problem of CH340T

Previous article:The difference between rom eeprom ram flash
Next article:Naming principles of Stm32 and STC

Latest Microcontroller Articles
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号