Author Topic: CH341A Serial Memory Programmer Power Supply Fix  (Read 258258 times)

0 Members and 29 Guests are viewing this topic.

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
CH341A Serial Memory Programmer Power Supply Fix
« on: October 14, 2017, 12:29:37 pm »
I bought one cheap chinese CH341A serial memory programmer black PCB (see attached picture).

Someone already did the schematic of this board (atached). Source:
https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html

All Vcc connections in the ZIF socket are 3.3V but the CH341A is powered at 5V.
So all I2C and SPI signals are 5V while the external memory is powered at 3.3V.
There are no limiting series resistors on those signals.

One simple solution to fix this issue is to simply bypass the 1117-3.3V regulator.
I can use the hot air station to remove the 1117 and then short-circuit the input with the output.

My question is, is it safe to just do the short-circuit without removing the 1117 linear regulator?
Best regards,
johnmx
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9748
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #1 on: October 14, 2017, 02:34:26 pm »
Not really.  A genuine LM1117-3.3V should be OK as there is a 5V version and it isn't a shunt regulator, but who knows what a 'chinesium' 1117 will do.   Also, if you want to convert to 3.3V you should not only remove it but patch in a current limiter in its place e.g. a 100mA polyfuse.

Why not power the CH341A at 3.3V to get all 3.3V signal levels? Lift the Vcc pin (28), and patch wire it to the V3 pin (9) and the output of the 117 3.3V regulator.
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #2 on: October 14, 2017, 03:03:45 pm »
Why not power the CH341A at 3.3V to get all 3.3V signal levels? Lift the Vcc pin (28), and patch wire it to the V3 pin (9) and the output of the 117 3.3V regulator.
I thought on that solution at first, but it requires a little more work. I need to cut two tracks and place 2 wires.
But yes, it is better to do like you say. A lot of serial memories are limited to 3.6V.
Best regards,
johnmx
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9748
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #3 on: October 14, 2017, 03:16:21 pm »
No track cuts, just lift pin 28 (easy because its near the board edge with nothing in the way) and run a wire from the lifted pin across to pin 9, and on to the 3.3V regulator output.

if in doubt, see the CH341A datasheet: https://hannover.ccc.de/redmine/attachments/download/213/CH341DS1.pdf
« Last Edit: October 14, 2017, 03:18:00 pm by Ian.M »
 
The following users thanked this post: johnmx

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #4 on: October 14, 2017, 03:57:15 pm »
Here is the result.
Next Monday I will replace the 0 Ohm R1 with a 100mA polyswitch.

Hope this helps other people.
Best regards,
johnmx
 
The following users thanked this post: mel

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #5 on: November 11, 2017, 04:23:09 pm »
Hi,

I have the same usb ch341a model and got a 3.3 v bios chip to flash. Not sure what I got to do to make it run at 3.3v? Lift a pin? Can you please post a better top-down photo?

Thank you
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #6 on: November 11, 2017, 05:45:44 pm »
I have the same usb ch341a model and got a 3.3 v bios chip to flash. Not sure what I got to do to make it run at 3.3v? Lift a pin? Can you please post a better top-down photo?
Just lift pin 28 and put some tape under it to prevent any short circuit. Then solder one wire from this pin to pin 2 of AMS1117 and also to C4. The side of the C4 to connect is the one connected to CH341A pin 9.
Best regards,
johnmx
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #7 on: November 11, 2017, 05:56:26 pm »
I thought the jumper placement controlled the operating voltage? Read pins 1-2 are at 3.3v and pin 2-3 at 5v.

But if not to lift that pin you have to heat up the solder first? Please post another top down photo?

Thank you
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #8 on: November 11, 2017, 06:21:49 pm »
I thought the jumper placement controlled the operating voltage? Read pins 1-2 are at 3.3v and pin 2-3 at 5v.
The jumper is to select device mode: EEPROM programmer or serial converter. See schematic on my first post.
Best regards,
johnmx
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #9 on: November 11, 2017, 06:25:01 pm »
Ok. So then why did they put on the market a defective bios programmer?!

 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #10 on: November 11, 2017, 08:02:17 pm »
Ok. So then why did they put on the market a defective bios programmer?!
I guess it is the first time you buy a chinese device.
Everything you buy from Aliexpress or similar is a crappy clone of the original.
In order to sell a low cost version of some device, they always use counterfeit parts and remove non-critical components.
If someone creates an apparent compatible circuit that costs 1 cent less, they start to sell it under the same name and description of the previous device.
They don't care about quality, only money!
Best regards,
johnmx
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #11 on: November 11, 2017, 08:06:20 pm »
Ok well I'm not going to try to repair this on the grounds I'm not sure how to do the repair.

Is there a Brand name you recommend? The green one has been vetted on Win-Raid. Not sure which one?

Thanks.


What do you guys think of this product? Its a Flashcat Programmer. Comes with a 3.3v/5v switch..


https://www.amazon.com/dp/B00F2P9AS6/?tag=phpprogramme
Modify message


« Last Edit: November 13, 2017, 03:39:29 pm by davidm71 »
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #12 on: November 19, 2017, 08:43:26 pm »
Just a quick update. I used my CH341A Black along with a SOIC8 Clip test adapter to jump start my dead Netbox back to life.
Nothing got short circuited, the world didn't come to an end, and it just worked with out the 5v paranoia.
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #13 on: November 19, 2017, 09:04:29 pm »
Just a quick update. I used my CH341A Black along with a SOIC8 Clip test adapter to jump start my dead Netbox back to life.
Nothing got short circuited, the world didn't come to an end, and it just worked with out the 5v paranoia.
It is no surprise that it worked. But as an EE Engineer I don't recommend to use the circuit like that.
Best regards,
johnmx
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #14 on: November 19, 2017, 09:08:18 pm »
Just a quick update. I used my CH341A Black along with a SOIC8 Clip test adapter to jump start my dead Netbox back to life.
Nothing got short circuited, the world didn't come to an end, and it just worked with out the 5v paranoia.
It is no surprise that it worked. But as an EE Engineer I don't recommend to use the circuit like that.

Sad thing is I couldn't get it to work with the FlashcatUSB programmer. That one had a 3.3v setting.
 

Offline davidm71

  • Contributor
  • Posts: 9
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #15 on: December 11, 2017, 06:34:33 am »
Guys,

I took a volt meter and got 3.3v between Vcc and Ground. Is there anywhere else I could test for the 5v output your talking about??

Thanks
 

Offline fulda

  • Newbie
  • Posts: 1
  • Country: cz
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #16 on: February 12, 2019, 12:38:16 pm »
All Vcc connections in the ZIF socket are 3.3V but the CH341A is powered at 5V.
So all I2C and SPI signals are 5V while the external memory is powered at 3.3V.
There are no limiting series resistors on those signals.

One simple solution to fix this issue is to simply bypass the 1117-3.3V regulator.
I can use the hot air station to remove the 1117 and then short-circuit the input with the output.

My question is, is it safe to just do the short-circuit without removing the 1117 linear regulator?

Hi,

The trick is, that you miss 2nd LDO, that is inside CH341A chip.
Check datasheet.

At end of chapter 5.2 硬件说明 (Hardware description) is stated:
CH341芯片支持5V电源电压或者3.3V 电源电压。当使用5V 工作电压时,CH341 芯片的VCC 引脚 输入外部5V 电源,并且V3 引脚应该外接容量为0.01uF~0.1uF 的电源退耦电容。当使用3.3V 工作
电压时,CH341 芯片的V3引脚应该与VCC引脚相连接,同时输入外部的3.3V电源,并且与CH341芯
片相连接的其它电路的工作电压不能超过3.3V。
It can be translated:
The CH341 chip supports a 5V supply voltage or a 3.3V supply voltage. When using a 5V supply voltage, the VCC pin of the CH341 chip inputs an external 5V power supply, and the V3 pin should be externally connected with a power supply decoupling capacitor of 0.01uF to 0.1uF. When working with 3.3V voltage, the V3 pin of the CH341 chip should be connected to the VCC pin, and an external 3.3V power supply is input, and the CH341 core is connected.
The operating voltage of other circuits connected to the chip cannot exceed 3.3V.

As far as I understand, that mean, that chip have internal 3.3V regulator and IO pins are NOT 5V tolerant. It mean, it always use 3V3 for communication with eeprom.
 
The following users thanked this post: wraper

Offline Sarcarean

  • Contributor
  • Posts: 28
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #17 on: February 27, 2019, 06:23:02 am »
@fulda FlashcatUSB uses a 5V to 3.3V LDO with 1A output. The switch on the side actually changes two MOSFETs that select either the 5V USB power or the LDO power for the entire circuit: USB PHY / MCU / SPI IO. This is one advantage of the ATMEGA32U2, it can run full speed (16MHz) at either 5V or 3.3V while providing USB (12mbit) connectivity.
 

Offline brouhaha

  • Newbie
  • Posts: 3
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #18 on: April 28, 2019, 01:41:12 am »
The trick is, that you miss 2nd LDO, that is inside CH341A chip.
Check datasheet.

At end of chapter 5.2 硬件说明 (Hardware description) is stated:
[...]
It can be translated:
The CH341 chip supports a 5V supply voltage or a 3.3V supply voltage. When using a 5V supply voltage, the VCC pin of the CH341 chip inputs an external 5V power supply, and the V3 pin should be externally connected with a power supply decoupling capacitor of 0.01uF to 0.1uF. When working with 3.3V voltage, the V3 pin of the CH341 chip should be connected to the VCC pin, and an external 3.3V power supply is input, and the CH341 core is connected.
The operating voltage of other circuits connected to the chip cannot exceed 3.3V.

As far as I understand, that mean, that chip have internal 3.3V regulator and IO pins are NOT 5V tolerant. It mean, it always use 3V3 for communication with eeprom.

I initially agreed with you about the interpretation of section 5 of the datasheet, and I was going to just hook it up to the 3.3V-only BIOS chip I need to reprogram and go for broke. However, I decided to be cautious and actually verify it. I now believe that the statement in section 5 of the datasheet is stated poorly, and what they mean is that when the chip is run from Vcc = 3.3V the I/O pins are not 5V-tolerant, but that the comment doesn't apply in the case where the chip is run from Vcc = 5V.

I hooked up the SPI signals of a new CH341A MiniProgrammer to a 4ch scope, and with no EEPROM actually connected, the CH341A is driving the CS, MOSI, and CLK signals in the high state to over 4.7V, and MISO is being pulled up to over 4.7V.

Note also that section 6 of the datasheet explicitly gives a Voh(min) spec of Vcc-0.5V,, and Vih(max) of Vcc+0.5V, where Vcc of the MiniProgrammer is the USB Vbus, e.g., 5V or so, rather than referencing Voh(min) and Vih(max) to the V3 pin. The Voh(min) as specified matches the observed behavior of the part.
 

Offline panoss

  • Frequent Contributor
  • **
  • Posts: 312
  • Country: gr
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #19 on: February 15, 2020, 05:35:41 pm »
I 'm raising this topic from the dead :D because I also ordered this programmer but (having read this topic) I didn't understand: should I modify it as suggested or it works as is?
Without any risk of burning the IC being programmed?
« Last Edit: February 15, 2020, 05:40:50 pm by panoss »
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #20 on: February 15, 2020, 05:43:24 pm »
I 'm raising this topic from the dead :D because I also ordered this programmer but (having read this topic) I didn't understand: should I modify it as suggested or it works as is?
Without any risk of burning the IC being programmed?
I recommend to modify it.
Best regards,
johnmx
 
The following users thanked this post: panoss

Offline WattsThat

  • Frequent Contributor
  • **
  • Posts: 399
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #21 on: February 16, 2020, 05:05:54 am »
For any new players out there intending to do this mod, the OP’s bodge wire modification shown in reply #4 is done correctly. What is wrong is the original schematic, it lists C4 twice. The 104 value C4 shown on the the 1117 input is in reality C1.
 
The following users thanked this post: panoss

Offline rygelfievel

  • Newbie
  • Posts: 1
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #22 on: April 11, 2020, 10:41:31 pm »
I'm about to take this on and have confirmed that the programmer I bought in August 2019 has a slightly different silkscreen.  What is known as C4 that @johnmx posted with picture of his mod is labeled C3 on my programmer.  The bottom two capacitors next to the oscillator are labeled C4 and C5 on mine.  Took meter to test continuity between C3 and V3 pin and it appears to not have changed physical location.  Tested C4 with V3 pin and confirm there is no connection.

I also tested the SPI header and it is still reporting 5V for CLK, CS, MOSI and MISO.  So it appears nothing has changed in the circuit other than the silk screening.

tsdr; C4 is now labeled C3 if you want to do the mod as physically nothing has changed.
 

Offline bul

  • Newbie
  • Posts: 1
  • Country: de
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #23 on: May 26, 2020, 10:00:23 am »
Hi!

I also ordered a black ch341a and wanted to use it on a 3.3V flash, thats still soldered in PCB. Unfortunately I fried the PCB - its dead now.
That leads me to this page and the fix thats discussed here.

Please allow me to ask some questions:
One simple solution to fix this issue is to simply bypass the 1117-3.3V regulator.
I can use the hot air station to remove the 1117 and then short-circuit the input with the output.
My question is, is it safe to just do the short-circuit without removing the 1117 linear regulator?
Would that change anything? Bypassing/shorting the 1117 will still provide 5V from USB to the ch341a, right? So what was the idea behind that?

No track cuts, just lift pin 28 (easy because its near the board edge with nothing in the way) and run a wire from the lifted pin across to pin 9, and on to the 3.3V regulator output.
So no polyfusethingies are needed? just the two little wires, and of course breaking the 5V supply?

Another Question: Are there by any chance ICs out there that need a signal Level of 5V and wont work with 3.3V, that could be programmed in this device?
If so, I would add somehow a switch at the Pin28 to switch between 5V and 3.3V to be able to choose the voltage level.

I wish you all the best and looking forward to hearing from you.

Bul

 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #24 on: May 28, 2020, 12:05:28 am »
Ok. I made the mods but not as per the suggestions in your post. First I lifted the supply pin and then broke the pin off in the end trying to fix routing of the wires. These pins are very weak without the support of the soldered joint. So I had to fix the IC's VCC connection first by grinding away the silicon carefully until I could solder a wire to the IC's VCC connection, then made a 3.3V bridge line from the VCC connection across the IC to create a track to solder connections to and thus restored the operation of the programmer. Then did a mod as per the information found on the internet to supply the Programmer VCC with the 3.3v. The  REASON why the PROGRAMMER fries some e.g. bios chips is because the CH341A chip is supplied with 5VDC on VCC originally ..... with outputs in some modes at 5V and other times at 3.3 Volt (from the on board regulator). So the safest is to make it a complete 3.3V  system for now overall.  Best would be to modify it with selector for either 5V, 3.3V or target board in circuit supply for VCC  to CH341A chip. The device is a very versatile winner, the Chinese final design not so much due to design flaws. The chip apparently have a 3.3V internal regulator or such  functions but info is lacking at best.

So in your case I think the 5V supply caused the damage. Which PCB are damaged? The programmer or Target Board?

I have no problems so far reading 5V or 3.3V chips. But in case I will just change to 5V when needed. A better way will be to make or buy a daughter interface board that plugs in the ZIF socket to convert to 5V or 1.8V circuits as required. 

See upcoming attachments  to follow. (Get message files too large >>5000KB total?)
« Last Edit: July 08, 2020, 12:27:37 am by pupa »
 
The following users thanked this post: theIC

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #25 on: May 28, 2020, 12:19:40 am »
Ok. Herewith my mod to recover from disaster.
« Last Edit: May 28, 2020, 12:26:37 am by pupa »
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #26 on: May 28, 2020, 12:35:17 am »
Seen from top.

Very versatile unit. Can program  eeProm's as well as AVR's when using the right program. Have quite a collection of programs. The drivers is a bit of an issue as not all the apps works through the same drivers, damn annoying but not to much of a hassle if you know which driver works best with each app.
Hope you come right.
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #27 on: May 28, 2020, 01:21:01 am »
Ok. So then why did they put on the market a defective bios programmer?!

Did you see the price? Many people now owns and support the unit via research and new information and apps to write to EEProms and AVR's. There are a few projects already on the net with improved circuit and PCB designs for download. Soon it will be the de'facto standard for hobbyists.
EEProms is well supported through Flashrom  on Linux and on Windows there is a GUI app on the older release version.
AVR's are supported through a few programming apps for the hobbyist within limited support for the latest chips but then again there is MPlab for that in the meanwhile but at a cost in comparison.
Now I'm just waiting for AVRdude  to possibly revive, get updated and also support this programmer.
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #28 on: May 28, 2020, 01:27:10 am »
 Great. I was also lucky but as you can see even in this thread, there are many people crying. Best is to be safe by studying the specs and datasheet on the BiosChip number in question mounted on the target board. Could be a expensive lesson otherwise. The BiosMod forum is a good resource for information to read about that.
« Last Edit: May 28, 2020, 01:34:10 am by pupa »
 

Offline theIC

  • Newbie
  • Posts: 1
  • Country: us
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #29 on: July 07, 2020, 12:17:15 am »
Ok. Herewith my mod to recover from disaster.
I created an account just to thank you all for the wonderful mod. From Chuck Nemeth's blog which lead me here to Pupa's fix.
I attempted to do the mod, and did not have the dexterity as some of you. I attempted to use some leftover ethernet cable strands and between the insulation burning away and also breaking pin 29 from the IC, I got the idea from pupa to grind away the area by pin 29 to expose some metal to resolder the wire. Anyway, it all worked.

 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #30 on: July 07, 2020, 11:02:22 pm »
Ok. Herewith my mod to recover from disaster.
I created an account just to thank you all for the wonderful mod. From Chuck Nemeth's blog which lead me here to Pupa's fix.
I attempted to do the mod, and did not have the dexterity as some of you. I attempted to use some leftover ethernet cable strands and between the insulation burning away and also breaking pin 29 from the IC, I got the idea from pupa to grind away the area by pin 29 to expose some metal to resolder the wire. Anyway, it all worked.
Glad it worked for You. ;)
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #31 on: July 07, 2020, 11:22:17 pm »
All Vcc connections in the ZIF socket are 3.3V but the CH341A is powered at 5V.
So all I2C and SPI signals are 5V while the external memory is powered at 3.3V.
There are no limiting series resistors on those signals.

One simple solution to fix this issue is to simply bypass the 1117-3.3V regulator.
I can use the hot air station to remove the 1117 and then short-circuit the input with the output.

My question is, is it safe to just do the short-circuit without removing the 1117 linear regulator?

Hi,

The trick is, that you miss 2nd LDO, that is inside CH341A chip.
Check datasheet.

At end of chapter 5.2 硬件说明 (Hardware description) is stated:
CH341芯片支持5V电源电压或者3.3V 电源电压。当使用5V 工作电压时,CH341 芯片的VCC 引脚 输入外部5V 电源,并且V3 引脚应该外接容量为0.01uF~0.1uF 的电源退耦电容。当使用3.3V 工作
电压时,CH341 芯片的V3引脚应该与VCC引脚相连接,同时输入外部的3.3V电源,并且与CH341芯
片相连接的其它电路的工作电压不能超过3.3V。
It can be translated:
The CH341 chip supports a 5V supply voltage or a 3.3V supply voltage. When using a 5V supply voltage, the VCC pin of the CH341 chip inputs an external 5V power supply, and the V3 pin should be externally connected with a power supply decoupling capacitor of 0.01uF to 0.1uF. When working with 3.3V voltage, the V3 pin of the CH341 chip should be connected to the VCC pin, and an external 3.3V power supply is input, and the CH341 core is connected.
The operating voltage of other circuits connected to the chip cannot exceed 3.3V.

As far as I understand, that mean, that chip have internal 3.3V regulator and IO pins are NOT 5V tolerant. It mean, it always use 3V3 for communication with eeprom.

Maybe these videos will make it clear that without the recommended mods how casual use without consideration for proper voltage levels to the target bios/memory chips could lead to a disaster. It also shows actual voltage measurements, thus how to test and confirm the voltages for yourself for peace of mind. It also confirms how versatile this device is by showing how it can be modified by providing a simple modification to further extend its use.

Enjoy!

CH341 Programmer 3.3V Fix:



Modify the CH341A EEPROM Programmer (Black Edition) for 5V 93XXX & 95XXX Automotive Use:



 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #32 on: July 08, 2020, 12:09:08 am »
Ok. So then why did they put on the market a defective bios programmer?!

Did you see the price? Many people now owns and support the unit via research and new information and apps to write to EEProms and AVR's. There are a few projects already on the net with improved circuit and PCB designs for download. Soon it will be the de'facto standard for hobbyists.
EEProms is well supported through Flashrom  on Linux and on Windows there is a GUI app on the older release version.
AVR's are supported through a few programming apps for the hobbyist within limited support for the latest chips but then again there is MPlab for that in the meanwhile but at a cost in comparison.
Now I'm just waiting for AVRdude  to possibly revive, get updated and also support this programmer.

Just to confirm AVRDude 6.3 fully supports the CH341A programmer. Using the search program "Search  Everything" I searched for all instances of AVRDude.exe on my development system as many programs and IDE's use it, then renamed (i.e. backed up) the original files, then updated AVRDude.exe as well as AVRdude.conf with the updated AVRDude 6.3 files taken from http://forum.easyelectronics.ru/viewtopic.php?f=13&t=32626%D0%BD%D0%B0 (Use Google translate to read but take note that the download links only works from original Russian site). I also patched the Arduino AVRDude folder the same way thus  the Arduino IDE 1.8.12 now also it works well with the CH341A programmer.  :)

The AVRDude.conf file should contain the following information to be sure its working with the original WCH driver and port shown as "USB-EPP/I2C... CH341A" in device manager in windows 10.

programmer
  id    = "ch341a_bitbang_wch";
  desc  = "ch341a programmer (bitbang_wch)";
  type  = "ch341a_bitbang_wch";
  connection_type = usb;
  usbvid     = 0x1A86;
  #usbpid     = 0x5512;
  usbpid     = 0x5523;
  usbvendor  = "wch.cn";
  usbproduct = "CH341A";
;
« Last Edit: July 09, 2020, 11:07:10 am by pupa »
 

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
    • Upcycle Electronics
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #33 on: July 11, 2020, 08:00:45 pm »
I got bored and retraced...
« Last Edit: July 14, 2020, 06:34:09 am by jakeisprobably »
 
The following users thanked this post: oPossum

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
    • Upcycle Electronics
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #34 on: July 14, 2020, 06:27:21 am »
I reworked the attached images above. I also uploaded a new version of the schematic in PDF on github. The dot pro files are included for kicad. I haven't bothered to make it pretty on github. The files are a bit of a mess as these are the result of creating the files on one computer and transferring them to another, doing a couple more edits, then making the git repository. On the bright side, I can confirm, all the files and libraries needed are included. I have also created a 1:1 reproduction of the programmer in PCBnew. Have fun.   
https://github.com/Upcycle-Electronics/CH341A-Pro
« Last Edit: July 14, 2020, 06:44:45 am by jakeisprobably »
 

Offline fudmuffin

  • Contributor
  • Posts: 23
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #35 on: July 15, 2020, 03:52:16 am »
Hi. Could someone please confirm if upon connecting to a USB power supply there should be immediately any voltage at all on MOSI or MISO?

One of the videos linked above seems to indicate that we can check for the possible need for the mod by confirming that there is 5V on the data pins. When I plug my CH341A adapter (black version as discussed here) into a USB power supply I am seeing 5V on CLK, CS pins but I am not seeing any voltage at all on MOSI or MIOS (neither 5v or 3.3v). It is in SPI programming mode (with the jumper bridging 1-2).

« Last Edit: July 15, 2020, 05:22:36 am by fudmuffin »
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #36 on: July 15, 2020, 05:27:24 pm »
Hi. Could someone please confirm if upon connecting to a USB power supply there should be immediately any voltage at all on MOSI or MISO?

One of the videos linked above seems to indicate that we can check for the possible need for the mod by confirming that there is 5V on the data pins. When I plug my CH341A adapter (black version as discussed here) into a USB power supply I am seeing 5V on CLK, CS pins but I am not seeing any voltage at all on MOSI or MIOS (neither 5v or 3.3v). It is in SPI programming mode (with the jumper bridging 1-2).

Simply put. There is a need to do the modifications!! Unless, if you are going to use the programmer only on your own hardware and it works for you. If you try it on other hardware e.g. motherboards,  without doing your proper research first, then it could lead to a damaged equipment, Ditto. So all depends what you want to do with the CH341A. If it works "as is" for you, then fine if used on your own known equipment. If you are going to use it on other unknown hardware circuits containing low voltages components then be aware of the risks.

I measured again as per request and confirm the measurements are as per the videos. See picture below.

In the meantime I bought and received an additional CH341A which will be modified with adding a 3.3v/5V voltage switch. The original recovered CH341A will be used in project as daughter-board and/or its components transferred to a new design PCB with additional mods i.e.
1 Add a switch to be able to choose between required voltage sources as either 3.3V, 2.8V, 5v or target board supply.
2 Breakout all pins to be available for use in other modes as per datasheet (i.e. Development board).
3 Add specific standard headers.
4 etc.

CH341A   

[attachimg=1]
« Last Edit: July 15, 2020, 05:35:34 pm by pupa »
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #37 on: July 15, 2020, 06:02:57 pm »
I reworked the attached images above. I also uploaded a new version of the schematic in PDF on github. The dot pro files are included for kicad. I haven't bothered to make it pretty on github. The files are a bit of a mess as these are the result of creating the files on one computer and transferring them to another, doing a couple more edits, then making the git repository. On the bright side, I can confirm, all the files and libraries needed are included. I have also created a 1:1 reproduction of the programmer in PCBnew. Have fun.   
https://github.com/Upcycle-Electronics/CH341A-Pro
As per original circuit design?
Any mods as per requirement for voltages and stability?
 

Offline fudmuffin

  • Contributor
  • Posts: 23
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #38 on: July 15, 2020, 11:50:13 pm »
I measured again as per request and confirm the measurements are as per the videos. See picture below.

Thank you for your confirmation which leads me to conclude that my CH341A chip must be damaged, as I am seeing 0v on MOSI and MIOS when the adapter is plugged into USB power (strange, as the device still enumerates correctly on USB when plugged into a computer). Anyway I have a new one on the way so I can do comparisons when it arrives. Thanks so much for your work.
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #39 on: July 16, 2020, 12:07:22 am »
I measured again as per request and confirm the measurements are as per the videos. See picture below.

Thank you for your confirmation which leads me to conclude that my CH341A chip must be damaged, as I am seeing 0v on MOSI and MIOS when the adapter is plugged into USB power (strange, as the device still enumerates correctly on USB when plugged into a computer). Anyway I have a new one on the way so I can do comparisons when it arrives. Thanks so much for your work.
No hassle at all.
Can it read/write/verify successfully? Some units have errors on PCB. The quality systems from China are difficult to control and maintain. So you should check your unit thoroughly for solder bridges or missing components.
 

Offline fudmuffin

  • Contributor
  • Posts: 23
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #40 on: July 16, 2020, 12:50:41 am »
Can it read/write/verify successfully? Some units have errors on PCB. The quality systems from China are difficult to control and maintain. So you should check your unit thoroughly for solder bridges or missing components.

No I haven't been able to get it to work. The lack of any voltage on MOSI and MISO leads me to belive the chip is broken internally, though it's strange that is still enumerates from the USB side. No solder bridges or missing components on this one. I've attached a photo of the unit just in case anything's noticeable. I would like to buy a few replacement CH341A chips to try repairing it but the loose chips seem almost as expensive as the fully constructed units.

I do have a different  CH341A based programmer and it does work, although when it arrived it had a capacitor installed where there should have been a 2k resistor to enable the SPI programming mode (noticed after reading the datasheet). I haven't verified if the other component values are correct. I also had to remove a solder bridge from the underside. Confirmed on this different model that there is 3.3V on MOSI and MISO by default. Attached a photo of this one too.
 

Offline pupa

  • Contributor
  • Posts: 14
  • Country: za
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #41 on: July 16, 2020, 01:12:47 am »
Do you read approximate 3v3 to 3.6 volt from the internal regulator on pin#9 of the Ch341A IC i.e same voltage across C4?
 

Offline fudmuffin

  • Contributor
  • Posts: 23
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #42 on: July 16, 2020, 01:52:19 am »
Do you read approximate 3v3 to 3.6 volt from the internal regulator on pin#9 of the Ch341A IC i.e same voltage across C4?

yes,

3.47v on pin #9
3.47v across C4

0v on pin #20
0v on pin #22
5.15 going in to the regulator
3.28 coming out of the regulator.

 

Offline jakeisprobably

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
    • Upcycle Electronics
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #43 on: July 16, 2020, 04:32:26 pm »
"...it's strange that is still enumerates from the USB side.
"Enumerates" according to the host PC or the CH341A?
  I think the ACT pin should go low if the chip has enumerated correctly. I have no idea why they made the jumper thing on the side, but according to the chinglish datasheet I believe the ACT pin is just supposed to connect to cathode of an LED with a resistor. The pin already has a 2k2 resistor in series and pin "3" has no connection, but is right beside a power trace. Just add a solder bridge and LED...or check with a meter.
 

Offline fudmuffin

  • Contributor
  • Posts: 23
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #44 on: July 28, 2020, 04:11:19 pm »
"...it's strange that is still enumerates from the USB side.
"Enumerates" according to the host PC or the CH341A?
  I think the ACT pin should go low if the chip has enumerated correctly. I have no idea why they made the jumper thing on the side, but according to the chinglish datasheet I believe the ACT pin is just supposed to connect to cathode of an LED with a resistor. The pin already has a 2k2 resistor in series and pin "3" has no connection, but is right beside a power trace. Just add a solder bridge and LED...or check with a meter.

Finally got a chance to check on this.. I meant it enumerates according to host PC. Under linux I see:

Quote
new full-speed USB device number 4 using xhci_hcd
New USB device found, idVendor=1a86, idProduct=5512
New USB device strings: Mfr=0, Product=0, SerialNumber=0

ACT remains at 5v after I get that message on host PC (also at 5v when I plug it into a USB battery i.e. nothing to enumerate with). My other CH341A (mini-USB version pictured above, which works) remains HIGH too (albeit at 3.3v) after I see the same text. I haven't looked into the CH341A enough to know whether ACT is supposed to go low when recognised by the host pc or later during some USB initialization perhaps before chip programming.

Thankfully I was able to program the chip for my project using the other working one, but I'd be curious as to what's wrong with my black CH341A programmer, and will test it further in the coming weeks. I may attach a LED as you (and datasheet) suggest so I can see if ACT goes low during a programming attempt.
 

Offline PostNubila

  • Newbie
  • Posts: 4
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #45 on: September 16, 2020, 02:53:36 am »
This is my mod of the CH341A. I change it to 3.3V and added 2 ZIFs: 1 for 3.3V and other for 5V (used a YF08E to convert 3.3V to 5V).
The ZIFs are 24 pin so now I can program 24xxx, 25xxx, 95xxx and 93xxx eeproms!
 

Offline firepower

  • Regular Contributor
  • *
  • Posts: 71
  • Country: au
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #46 on: September 30, 2020, 06:49:02 am »
Found these two models searching for CH341A Programmer online. Has 3V3 connected to VCC of CH341A as well as socket & ICSP. has area onboard to clamp SOP8 / SOP16 chip using clothes peg :D
No modding needed.
I bought the blue version.
« Last Edit: October 20, 2020, 07:08:51 am by firepower »
 

Offline Mcast

  • Contributor
  • Posts: 5
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #47 on: January 18, 2021, 07:51:12 pm »
Hello, I have a question. I lifted pin 24 and soldered on pin 2 of the 3.3 volt regulator and it worked perfectly. Why do I need to wire pin 9? What does pin 9 do? Thanks.
 

Offline johnmx

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: pt
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #48 on: January 18, 2021, 08:31:25 pm »
Hello, I have a question. I lifted pin 24 and soldered on pin 2 of the 3.3 volt regulator and it worked perfectly. Why do I need to wire pin 9? What does pin 9 do? Thanks.
This chip has an internal +3.3V regulator. It is used when the device is powered by +5V. When the external power supply is +3.3V, it is necessary to bypass/disable this regulator by connecting +3.3V to pin 9.
Best regards,
johnmx
 

Offline Mcast

  • Contributor
  • Posts: 5
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #49 on: January 21, 2021, 02:22:09 am »
Thanks for the information.
You're right, I used the datasheet of USB serial converter CH340 as a reference:

"CH340 supports 5V and 3.3V operation. When using 5V operation, supply 5V to VCC pin, and
decouple the internal 3.3V reference with a capacitor of 4.7-20nF from V3 pin to ground.
When using 3.3V operation, tie V3 pin to VCC pin and supply 3.3V power."
« Last Edit: January 21, 2021, 06:50:25 am by Mcast »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 2954
  • Country: pl
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #50 on: January 21, 2021, 09:20:51 pm »
I suppose the 3.3V reg is used to power USB so the USB interface operates at reduced voltage without this connection because of losses in the internal regulator. Not a big deal if it works, but I would fix it.
 

Offline Mcast

  • Contributor
  • Posts: 5
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #51 on: January 24, 2021, 12:28:06 am »
Quote
I suppose the 3.3V reg is used to power USB so the USB interface operates at reduced voltage without this connection because of losses in the internal regulator. Not a big deal if it works, but I would fix it.

I tried to do what you said, I disconnected pin 28 and left only pin 9 powered, the device didn't turn on. I believe that there are other components within the integrated circuit that need power from pin 28.
« Last Edit: January 24, 2021, 12:30:41 am by Mcast »
 

Online magic

  • Super Contributor
  • ***
  • Posts: 2954
  • Country: pl
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #52 on: January 24, 2021, 12:46:25 am »
No, that's not what I meant. It looks like everything on this chip runs from VCC except for USB communications which require 3.3V.
When VCC=5V the chip generates V3 internally. When VCC=3.3V the internal regulator will output less than 3.3V on V3 so USB may work if you are lucky or it may sometimes fail to work. That's why you short V3 toVCC.
 

Offline fearconte

  • Newbie
  • Posts: 1
  • Country: ro
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #53 on: January 24, 2021, 05:11:06 pm »
Hi,

I have a CH341A Pro black "edition" and I tried to read some chips using clamp (chips are on board soldered), first the Detect doesn't work - ok china - i have selected the correct chip from list and read the chip.
on second read some data shifted and I was like this is not ok the chip is a Winbond W25X10
I have tried on different chip a PMC PM25LV512A which was read ok multiple times - erase - write - all good, strange but works with PMC not with Winbond which I need.

So I have searched the web and saw this post about the voltage, checked mine - 5V everywhere and I have started the mod using the OP
Lifted the pin 28 connect to C3 then to 1117 tested - success 3.3V - tried to Detect the chip still not working, tried to read, erase, program all error
Then I have tried next mod pin 28 to 1117 and pin 9 to 1117 - 3.3V but the same errors

Any ideas?

Thank you!

 

Offline Mcast

  • Contributor
  • Posts: 5
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #54 on: January 24, 2021, 06:33:41 pm »
Quote
No, that's not what I meant. It looks like everything on this chip runs from VCC except for USB communications which require 3.3V.
When VCC=5V the chip generates V3 internally. When VCC=3.3V the internal regulator will output less than 3.3V on V3 so USB may work if you are lucky or it may sometimes fail to work. That's why you short V3 toVCC.

Now I get it. I measured it and the difference between Vcc and V3 was about 130 millivolt, there is a loss of voltage too.
It's like 78xx, the regulator starts to become unstable (with noise, variation and the whole thing) when the input voltage stays the same with the output voltage.
I made the change, thank you all!
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 9748
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #55 on: January 24, 2021, 08:15:45 pm »
@Mcast, that's a nice neat job you should be proud of.

If you want to mod it to be a switchable 3.3V/5V programmer, in addition to the Vcc pin lift already discussed, you need to add a tiny DPDT switch with one pole switching Vcc between 3.3V from the LM1117-3.3V, and 5V (via a polyfuse), and the other shorting V3 to Vcc in the 3.3V position to bypass the internal regulator.  Where to mount it is the problem - if its small enough it may be possible to solder the switch body to the ground track along the board edge next to the three capacitors by the regulator, otherwise epoxying it on top of the CH341A chip would be a sensible option.

There's a good page about this programmer here: https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html

Finally, for those of you less experienced with SMD rework and board mods *PLEASE* for your and our sanity, and to reduce the risk of snapping the Vcc pin, get some 28 or 30 AWG Kynar wirewrap wire or magnet wire to do the mod with! If you *MUST* use stranded wire it needs to be something really thin and flexible, but with a good quality core,e.g. a single wire stripped from an old 80 wire UDMA PATA cable, ends carefully stripped, pre-tinned and trimmed to length *BEFORE* making the joints, and you need an order of magnitude more skill to get a decent result with stranded wire.
 

Offline Mcast

  • Contributor
  • Posts: 5
  • Country: br
Re: CH341A Serial Memory Programmer Power Supply Fix
« Reply #56 on: January 24, 2021, 10:23:38 pm »
Quote
@Mcast, that's a nice neat job you should be proud of.

If you want to mod it to be a switchable 3.3V/5V programmer, in addition to the Vcc pin lift already discussed, you need to add a tiny DPDT switch with one pole switching Vcc between 3.3V from the LM1117-3.3V, and 5V (via a polyfuse), and the other shorting V3 to Vcc in the 3.3V position to bypass the internal regulator.  Where to mount it is the problem - if its small enough it may be possible to solder the switch body to the ground track along the board edge next to the three capacitors by the regulator, otherwise epoxying it on top of the CH341A chip would be a sensible option.

There's a good page about this programmer here: https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html

Finally, for those of you less experienced with SMD rework and board mods *PLEASE* for your and our sanity, and to reduce the risk of snapping the Vcc pin, get some 28 or 30 AWG Kynar wirewrap wire or magnet wire to do the mod with! If you *MUST* use stranded wire it needs to be something really thin and flexible, but with a good quality core,e.g. a single wire stripped from an old 80 wire UDMA PATA cable, ends carefully stripped, pre-tinned and trimmed to length *BEFORE* making the joints, and you need an order of magnitude more skill to get a decent result with stranded wire.

I was really thinking about this upgrade, but there are 2 obstacles for me: I really care about the aesthetics of the adapter and the most of the memories I use, work at 3.3 volts. Maybe I will make a separate box to hold the new sockets and switches. Thanks for the tip!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf