CH341A Mini Programmer Schematic and Drivers

 Posted by:   Posted on:   Updated on:  2023-11-12T09:15:28Z

Take a look at the schematic of this versatile programmer to learn how to use it properly. An overview of CH341A devices with driver and tools download links

CH341A is an USB interface chip that can emulate UART communication, standard parallel port, memory parallel port and synchronous serial (I2C, SPI). The chip is manufactured by Chinese company Jiangsu QinHeng Ltd. CH341A is used by some cheap memory programmers. The IC is somehow limited in this configuration, because the programmer makes use only of the SPI and I2C interface and leaves a lot of pins unconnected. A popular device is the black CH341A MiniProgrammer that you can buy for 2 to 5 USD.

The problem with these devices is that you get them without any documentation or software. Drivers are available from manufacturer's website (but the site is written in Chinese). Also, some source codes are available from manufacturer. There are open source applications that support this programmer. But, first of all, let's have a look at the hardware.

Photo of the black CH341A Mini Programmer

Photo of the black CH341A Mini Programmer

A quick look at the board reveals the main electronic parts used: CH341A, a 12 MHz crystal required by the chip, a 3.3V regulator, two 7 pin headers and the ZIF (zero insertion force) socket. The programmer can be bought with additional sockets and adapters, some of them with voltage shifting circuits.

Schematic

After some searching I found a schematic of a CH341A based programmer, but it wasn't exactly right and complete. It didn't have the pinheaders on the sides of the ZIF socket which I wanted to know what they are for. I took the multimeter and started to trace lines on the programmer PCB until I got a complete schematic. The schematic is quite simple, based on datasheet.

Schematic of the black CH341A Mini Programmer

Schematic of the black CH341A Mini Programmer

I also found WAVGAT store (a seller on AliExpress). Their product page offered a the PCB design of the device (only top side, however).

CH341A Mini Programmer PCB

CH341A Mini Programmer PCB (by WAVGAT/AliExpress)

Now, let's return to the schematic and analyze it a bit. The chip is powered from 5V, so its I/O ports will also use 5V. Basically this is a 5V device. The problem is that any memory you fit in the socket will be powered from 3.3V. And this seems to be the only function of the 3.3V regulator (besides the 3.3V pin on the SPI connector). I don't know why the designer even used a regulator, if it didn't provide a switch to choose between 3.3V or 5V levels and supply.

By reading the datasheet, we can see that the manufacturer recommended to connect a 0.47 uF capacitor between RSTI (pin 2) and VCC for improved stability. There is none on this board.

Chip placement for programming with the MiniProgrammer
Chip placement for programming with the MiniProgrammer

Anyway, I used the device with I2C EEPROMS (3.3V and 5V) compatible and also SPI FLASH memories (3.3V devices) without any issues. For improved reliability and to avoid burning memory chips, I highly recommend using a level shifter. In order to turn this programmer into a 3.3V device, you could cut the 5V line from VCC pin (28) and tie it to the 3.3V output from regulator. You will also need to connect V3 pin (9) to VCC (3.3V). User johnmx from EEVblog Forum has succeeded in converting this programmer to 3.3V levels.

Note that the device works as a programmer only if ACT# pin is connected to ground via a resistor. That's why you should put a jumper across pins 1 and 2 of the UART connector. Otherwise the device will be recognized as a standard USB to serial converter.

Drivers and tools

The manufacturer of CH341A provides a lot of useful things on the product page. Here are the files you can find and what they contain (the first two are the ones you need):

  • CH341SER.EXE - self installing archive with USB to serial driver.
  • CH341PAR.EXE - self installing archive with multiprotocol interface driver (this one is for the programmer mode).
For advanced users and developers:
  • CH341SER.ZIP - archive containing driver files and serial API and library (you don't need specific API for standard serial port, but it contains some special functions to get IC version etc.)
  • CH341PAR.ZIP - archive containing driver files for interface mode and API (header and library to access the device and use any protocol you want).
  • CH341PAR_LINUX.ZIP - archive containing Linux driver source code and Linux API
  • CH341SER_LINUX.ZIP - Linux driver source code for serial port (don't need this one, it's already included in kernels)
  • CH341EVT.ZIP - some source code and tools written to be used with an evaluation board (may be useful for programming software that can access this device)
  • CH341DS1.PDF - datasheet, in Chinese
  • CH341DS2.PDF - some additional info and API documentation, in Chinese
  • CH341DP.ZIP - contains an ISP programming tool?
  • CH341DPS.ZIP - probably similar to the above, once required login to download

A regular user only needs the first two. Just double click on each of them and when the dialog appears click on Install. The API becomes interesting due to the versatility of the chip. You can build your own software that will read/write data from/to sensors, real time clocks or any other devices that use serial communication. You can also interface parallel devices to the chip, but this will require modification of the programmer board in order to connect to pins. Further reading for developers: I2C Programming and SPI Programming using Windows API.

Software

Programming utilities are available for Windows and Linux:

CH341A devices

There are also some other programmers and boards based on this chip. You can find most of them by searching "CH341A" on Banggood and AliExpress. Here is an overview of the programmers and development boards available:

CH341A Programmers and boards overview

CH341A Programmers and boards overview


62 comments :

  1. Great job. thanks for taking the time to share the information.

    Mike Z

    ReplyDelete
  2. I got the software installed, switched it to English from Chinese, and loaded the drivers. I still could not program a 24C32 EEPROM. After some board level troubleshooting I found that pins 1,2,3,4 and 15 were not connected to anything! That said, there was no chip ground and no connections to the 24C32 address lines. One other pin, socket pin 15, (EEPROM chip pin 7) was not grounded. that is the read/write line. After adding several jumpers to ground the programmer worked.

    Mike Z

    ReplyDelete
  3. the 470nF capacitor should not be between VCC and RSTI, as you say, but between V3(pin9) and ground where is, as the datasheet I found says, and shoud be between 10nF to 470nF.

    ReplyDelete
    Replies
    1. My bad, indeed for stability there should be an another capacitor as you wrote.

      Delete
    2. Both are correct. There should be an 0,47 uF ceramic capacitor between pin 9 of the CH341A and GND (for 5V VCC). If an additional (large) electrolytic capacitor is mounted on the VCC line, a ceramic capacitor, value 0.1 - 0.47uF, should be mounted between RSTI (pin 2) and VCC (pin 28), to lengthen the reset interval on the CH341A, because it just takes longer for the chip to reach the valid reset situation. Because no large electrolytic capacitor is been mounted on the PCB (VCC) for this, the RSTI capacitor has probably been omitted tp save cost.

      Delete
  4. How can I do to pay this product

    ReplyDelete
  5. https://drive.google.com/file/d/0ByEQKtsOckWBUVBqajZOUGtLcnM/view
    where files are all zipped together and a good video for this is at
    https://www.youtube.com/watch?v=L0ChYNwunUE

    ReplyDelete
  6. I have one of these arriving to programme some 24Cxx devices. I don't think the 3.3/5.0 volt issue is a problem here because the SDA and SCL voltages are derived from pull up resistors. So 3.3v devices should not be stressed. However if the pull ups are powered from 3.3v via a LED I doubt the 24Cxx specs are being adhered to - ADA and SCL will only go to less than 2V ????

    ReplyDelete
    Replies
    1. That was a difficult question. I took the multimeter and measured (again) the voltages on the idle I2C bus. 4.9 volts... I unplugged the programmer and tried to measure resistance between I2C bus pins and power line (3.3V and 5V). Nothing conclusive. So I returned to datasheet. Here is what it says in the Chinese PDF at page 3, section 4.2, pin 24 of 341A (translated with Google): "Chip function configuration output, built-in pull-up resistor, can be connected to the serial EEPROM configuration chip SCL pin". The pull-ups are therefore built-in. And look at the schematic again: only SDA is connected to the LED. What would be pulling SCL up if it weren't the built-in resistors?

      Delete
    2. Thanks for that, sorry I'm over 2 years late. Your email updates are always of interest, and often useful.

      Delete
  7. Hi, reading chinese datasheet for CH341 and 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.

    ReplyDelete
    Replies
    1. "The operating voltage of other circuits connected to the chip cannot exceed 3.3V" when CH341A is powered from 3.3V. Otherwise, I/O pins use 5V when chip is supplied with 5V. There is no mention of an internal regulator in datasheet.

      Delete
    2. You can easily ascertain yourself. Measure pin 9. When powered by USB, the pin will have 3.4V, which is the value of the sloppy and wonky internal regulator.

      It stands to reason that all WinChipHead chips use a common core and all have a 3.3V 8051 USB core - it is a good solid idea, since USB bus D+ and D- pins have 3.3V signalling. You will find the LDO designated on datasheets for something like CH559.

      This doesn't prevent the chip from having programmable IO pullups which go to 5V and evidently deliver on the order of 4.7V. The reason it's usable at all is that it has 5mA current limiting on MISO, MOSI and CLK pins, not mentioned in the datasheet, but you can ascertain yourself. This current is absorbed by the ESD diodes on the target device and brings the voltage down to within not blowing the target device up!

      Delete
  8. Hello,

    I need a recommendation for a capable and quality device that you consider better than the CH341A that can do everything the CH341A does (and more) that I may be able to get for under $75.00 US.

    Steve Sybesma
    Brighton, CO

    ReplyDelete
  9. Another question would be, can a EZP2010 do everything that a CH341A does (and more)? Are they any more capable/better quality or just the same? It's very hard to evaluate this stuff because I'm just looking at pictures and have no idea of the reputation in the community for any of these. I don't want to waste my time with something that is junk.

    ReplyDelete
  10. You can convert the programmer to 3.3V version by cutting the track from the 3.3V regulator to the chip pin 28 and putting a jumper between 5V and 3.3V pins.

    The track is located underside the board and it is very easy to cut with a knife. The result is the same as explained in the EEvblog but no soldering needed.

    ReplyDelete
    Replies
    1. Do you have a picture or a diagram of where to cut the track with a knife? TYIA!

      Delete
    2. STOP! you don't need to mod these for 3.3v chips. measuring while the programmer is not connected will show 5v. connect it to a 3.3v chip, and it will drop to 3.5v

      please stop spreading this false information!

      Delete
  11. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. 24C02 series EEPROM are I2C devices supported by CH341A. The same chip, CH341A, supports both I2C and SPI protocols. Programming software runs on Windows 7 too.

      Delete
  12. Interesting. I have two different CH341 programmers. Neither will program my X24c01 devices. I miss my PonyProg. Is it possible to convert this chip into a parallel port, and use it with PonyProg hardware?

    ReplyDelete
    Replies
    1. Unfortunately not. Although you can use CH341A to emulate serial and parallel ports, you cannot use them with PonyProg. Bit banging does not work with USB serial or USB parallel adapters.

      Delete
  13. Sir/Madam,

    Just received the YJ CH341A mini programmer.
    Clipped it to the AT24C02D-SSHM-T on our PCB.
    It reports:
    $ sudo flashrom --programmer ch341a_spi -r backup.bin
    Calibrating delay loop...OK.
    No EEPROM/flash device found.

    Should I follow the:
    "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.?"

    Sincerely,
    Liu


    ReplyDelete
    Replies
    1. AT24C02D is an I2C EEPROM. You must clip it in the I2C half of the socket (see here). You'll have to use a different programming software, because flashrom does not support I2C EEPROMS.

      Delete
    2. Comelius,

      Appreciate your comment.
      Could you please recommend a i2c EEPROM programming software compatible with ch341a ?

      Sincerely,
      Liu

      Delete
  14. I am a student and completely new to this hardware. I loaded the i2c linux drivers and it created a dev file for the same, but when I try to detect the i2c slave sensor's address through i2cdetect, i2c slaves are detected on each address in the searching range. This happens even if I disconnect the SDA and SCL from the sensor.Anyone who faced similar issues and can help?

    ReplyDelete
    Replies
    1. A system may have multiple sensors there.
      If SDA and SCL to the sensor disconnected and i2cdetect the same list of hardware, probabley the sensor is not detected at all.
      1.Hookup a i2c analyzer to the sensor SDA & SCL and start capturing i2c traffic
      2. launch i2cdetect again.
      3. look in the i2c capturing to see if any traffic happened to the i2c address of the sensor DUT.

      Good luck

      Delete
  15. Hello, in datasheet is stated that the chip supports paralell memory, can it flash a 28fxx/29fxx family?

    ReplyDelete
    Replies
    1. It can't flash parallel chips using this programmer.

      Delete
  16. Ahh, its misleading then, what a pity. I have buyed this with the hope of program old bioses like the P3/P4 because the price of th willem in my country is prohibitive

    ReplyDelete
  17. Do you know another altenative for program paralell chips for a budget?

    ReplyDelete
  18. I bought the same programmer from this guide and modified it to operate at 3.3V. I've tried in Windows using the drivers above and AsProgrammer and in Ubuntu using flashrom. In both cases I can read the chip and flashrom even correctly identifies the chip automatically. But in both cases the chip verification fails. Every read is different, with a different md5sum. Any thoughts on why this might be?

    ReplyDelete
    Replies
    1. Is every read following a write different? Or just any succesive reads return different data from memory?

      I don't know what to say. Are you sure the wiring is okay? I myself had issues with a SOIC8 clip which had a wire not connected.

      Delete
    2. Thank you so much for responding to me, especially on an older thread like this.

      My intended workflow was to extract the SPI Flash bin file, modify a section, and flash the modified bin file back to the chip, so I didn't want to write anything to the chip until I got a good read. I don't know if every read would have been different after a write. Successive reads returned different data.

      As I was trying other methods before buying the CH341A programmer, the chip was on a bodged-together carrier board. I thought, however, that my wiring was okay as I could read the correct ID from the chip.

      I did get it to work last night, although not using the CH341A programmer. Because of my weird arrangement, I wondered if it could be an issue due to noise on the SPI bus. I wondered if I could fix this by playing with the SPI speed. As the CH341A can't do that, I got my raspberry pi up, which has native SPI and flashrom support, and used flashrom to play around with the speeds. After a lot of trial and error, I got multiple good, verified reads and proceeded to modify the bin file, successfully upload and verify the flash chip, resolder the chip, and boot the device.

      With how I arrived at my solution, I do wonder if I could have been helped by adding the datasheet-recommended 0.47 uF capacitor as you describe above.

      Although this guide wasn't what solved my problem, it was rich with information and gave me the tools I needed to get where I needed. Thank you so much for the amazing work here.

      Delete
    3. I don't know if that capacitor would have made a difference. The SPI of CH341A looked rather strange on my logic analyzer. The clock frequency is about 1.7 MHz. Have a look at CH341A SPI. I guess I could do some oscilloscope sampling on the SPI port, sometimes.

      Delete
  19. Hello admin, thank you for this very useful information about the CH341.
    We are creating a video content on YouTube, and we are referring to the schematic of Mini Programmer CH341 in this post.
    this is the link : https://youtu.be/hn9P9GnwJkI

    ReplyDelete
  20. I found a version that has a multi voltage switch (1.8V, 2.5V, 3.3V 5V) but the price is a little higher:

    https://www.aliexpress.com/item/4001272558261.html

    ReplyDelete
  21. xtw100 progamador nao tem drive para instalacao

    ReplyDelete
  22. Actually, there's a much easy way to do this fix; you just have to cut a track on the board and add a plastic jumper on pins labeled '3.3V' and '5V'. I've have successfully flashed a Winbond 25Q64FVSIG which is a 3V chip.
    » https://www.geocities.ws/racejay/ch341a/3.3V_Easy_Fix.jpg «

    ReplyDelete
    Replies
    1. This worked for the voltage but anytime I put the clip on a chip the device would disappear out of windows. I tried with battery in, PSU attached etc.. multiple motherboards. I don't know if that issue is related to the mod or not. The clip is a bastard to get it clip on properly. I eventually de-soldered the chip with my fingers crossed (not experienced). I wasn't confident soldering the chip and de-soldering it again onto the adapter, so instead I took the spring out of the clip and put the bios chip as deep as it would go into the clip and closed it manually. I was able to flash it like that. Now I just need to get it back on the mobo without stuffing it up....

      Delete
    2. I'd just like to thank the original author for providing the schematics, and all the other useful information for a newbie like myself.

      I can also confirm, that the "no solder" modification of my black CH341A programmer to 3.3V as suggested by "RaceJay" worked really well to remove the BIOS password from the 25Q128 chip in my HP Folio 9480m. Initially I was a bit reluctant, as I had of cause read about the need to also connect V3 (pin 9) with 3.3V. But at least in my case, this seems not to have been required.

      Mind you, I had enough soldering to do in "close quarters". The SOIC-8 clip that came with the programmer was pretty much useless. So I soldered eight thin wires to the pins of the 25Q128, and left this IC on the PCB. I also saw no need to attach the PSU to the notebook, as I've seen suggested at some sites.

      Delete
  23. Yo he pedido el CH341A , y en su lugar me han enviado el CH341B , el problema es que no se si tiene las mismas caracteristicas de voltajes y conexiones y de si se usa el mismo Software .

    ¿ Alguien me podria ayudar o darme alguna orientacion o enlace donde pueda encontrar mas info sobre el CH341B ?.

    ReplyDelete
  24. This comment has been removed by a blog administrator.

    ReplyDelete
    Replies
    1. Se me olvido poner el enlace de lo que me enviaron https://en.mail.qq.com/cgi-bin/ftnExs_download?t=exs_ftn_download&k=70656339bc0e1ad09821c813173053051803025d09085655014852010652490354060114510906561a53550c520907010551060d043075370754530e0005441717b2a9f8ff1e1e5e47655d&code=7ec900d7&fid=72/fad982b6-186b-4ccb-a9ba-665b9c624e44:

      Delete
  25. Os dejo por aqui otr enlace par que quiera descargarlo desde Mega : https://mega.nz/file/w75gkDzK#ByEAtrqiCW2UCcP5j9bgOYDq06PQWsCZ6JeC07hYQWg

    ReplyDelete
  26. Hi
    Try Neoprogrammer works with the CH341 too

    ReplyDelete
  27. Found a great Video On Youtube about volt modding the CH341a.
    It is called... Volt-modding the CH341a Mini Programmer - LFC#278 and here is the LINK...
    https://www.youtube.com/watch?v=HwnzzF645hA
    This video was a really good video on HOW TO MOD THE CH341a. Take Care.

    ReplyDelete
    Replies
    1. Stop it... Get some help. THESE DON'T NEED TO BE MODDED! once you connect it to a 3.3v chip it drops to 3.5v

      It pains me to think how many people have modded and lost 5v compatibility, or botched modding these perfectly fine programmers. x_x

      Delete
    2. Hi, am I understanding correctly, I should convert my CH341B back to 5V? Now it can only read flash, erase or write only works in single cases and mostly the programmer hangs on libusb timeout error.
      Thanks in advance for the answer.

      Delete
    3. An unmodified programmer supplies the memory with 3.3 V, while using 5 V for data I/O.

      Delete
    4. Now my programmer is unstable. I not have idea. An hour ago its wrote and verified the flash without problems, but now trying to write/clear the flash makes the programmer "hang", and flashrom and ch341prog write about libusb timeout or "programmer not ready".
      How can I fix this and is it related to the modification to 3 volts?

      Delete
  28. Took about a Day to get My CH341A (Black) working.
    Whenever i tried a flash erase the USB device would disconnect !.
    It transpired that C1,C2,C3 were 10nF. I changed them to 100nF, added 10uF on the 5v input to the regulator and 100nF on the Daughterboard holding the SPI Flash (W25Q64J).
    Everything now works with Neoprogrammer.

    ReplyDelete
  29. Nice job!
    I can't get it to work with the memory ZD25WD40BTIGT . The programmer doesn't find it using the CH341A - USB Programmer 1.30 tool. Any clue?

    ReplyDelete
    Replies
    1. I don't know, it should find it. Otherwise, select a common 25X40 chip and try to read it.

      Delete
  30. Please see my CH341a Linux programmer IMSProg https://github.com/bigbigmdm/IMSProg

    ReplyDelete
  31. Bonjour @ tous...j'ai acheté la fameuse clé avec tout les adaptateur..électro de base j'ai recalé en 3v3...seule hic mon soft reconnais 2 sérial sur un 8P winbond et non 1..je suis largué...je suis sur la version 1.30 impossible de choisir l'un des deux sérial proposé..le chip est soudé sur son support 8 Pin..point d’indication respecté en 5...les erase ou copy test s'arretent a 20% et m'indiquent : Erase operations timeout failed : code 3...avez vous une idée ?

    ReplyDelete
    Replies
    1. When CH341A is in programmer mode (ACT pin connected to ground), no serial port appears when you connect it.

      Delete

Please read the comments policy before publishing your comment.