Documents and Software Related to the famous CH341a used in I2C/SPI Flash Programmers also called as BIOS Programmers
Please note that this repository is a Coagulation of know-how from different sources.
Source : https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html
This is versatile USB to multi-protocol converter chip.
There are 4 major items that become clear from the enclosed Datasheet(English)
- UART - The chip can be used as a USB to UART converter. It can also be used for RS-485 since it has automatic driver control pin also available.
- Synchronous Serial - I2C and SPI - The chip has 3 chip select pins and Multi-mode support for SPI protocol. Also the chip has dedicated I2C pins.
- Parallel Interface - This interface can be used to talk to parallel memory Bus with all the required control signals
- Printer Port - The device can emulate a EPP Parallel Port over USB to be able to connect to older printers .etc.
- OneTransistor https://www.onetransistor.eu/ - Good website if you are looking for electronics ideas and many Maker topics.
- More Specifically the Article : https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html . A PDF version of this article is available here.
- How to use CH341A to Program a Arduino-Pro Mini : https://www.onetransistor.eu/2018/02/program-arduino-pro-mini-with-ch341a.html
- Windows API for I2C Programming : https://www.onetransistor.eu/2017/09/ch341a-usb-i2c-programming.html
- Windows API for SPI Programming : https://www.onetransistor.eu/2017/12/ch341a-usb-spi-programming.html
- Electrodragon https://www.electrodragon.com - One of the best Maker shops out there, you can find tons of goodies for your projects
- Very useful breakout board for CH341a Chip: https://www.electrodragon.com/product/ch341-usb-convert-flash-board-usb-ttl-iic-spi-etc/
- Documentation about the board: https://www.electrodragon.com/w/CH340
- Jiangsu QinHeng Ltd Company creating these wonderful CH341a ICs http://www.wch.cn/
- Translated Version of the Website: https://translate.google.com/translate?hl=en&sl=zh-CN&u=http://wch.cn/
- Product Page of CH341a IC : https://translate.google.com/translate?depth=1&hl=en&rurl=translate.google.com&sl=zh-CN&sp=nmt4&u=http://www.wch.cn/products/CH341.html
- Alexander Gavrilov - Provided us with the following insight:
- OpenSource usbASP Flash Programmer .aka. AsProgrammer https://github.com/nofeletru/UsbAsp-flash Windows GUI Based programmer significantly better performance than closed-source version see Issue #5
- Avrdude version supporting CH341a https://github.com/Alx2000y/avrdude_ch341a
- Ch341Programmer - Closed Source Links: http://televid-sib.ru/index.php?topic=42039.msg161311;topicseen#msg161311
- Colibri - Closed Source Links: http://apkservice.ru/articles/page,1,7,28-soft-dlya-programmatora-na-ch341a.html
- Postal3 - Closed Source Links: https://monitor.net.ru/forum/threads/436716/
- postal3_ch341 - Closed Source Links: http://docs.expressvl.ru/postal3_ch341.html
- Github User BigBox2020 has provided us with flashrom
instructions and some closed-source programming options.
Here are the contributions:
- ch341a programmer v1.13 https://drive.google.com/file/d/0ByEQKtsOckWBUVBqajZOUGtLcnM/view
- Video Tutorial on how to use ch341a programmer v1.13 https://www.youtube.com/watch?v=L0ChYNwunUE
- flashrom Tutorial for Windows https://www.win-raid.com/t796f16-Guide-Using-CH-A-based-programmer-to-flash-SPI-EEPROM-5.html#msg41915
- How to do HP PAVILION 500-0XX/ENVY 700-0XX BIOS RECOVERY https://vdhout.nl/2018/02/hp-pavilion-500-0xx-envy-700-0xx-bios-recovery
- Github User BigBox2020 has been kind enough to provide us with the Virus report of the above packages.
- Virus total report for ch341a programmer v1.13 https://www.virustotal.com/gui/file/0b6aba1bfa041ea3484cb4e6750427de468ece553a9461dba388fee16ad3669a/detection
- Virus total report for flashrom windows https://www.virustotal.com/gui/file/0eb1e5cde08fa44e015c5b56d01e330078a32b4efad4336513ee789f974b559c/detection
- Github User DSchndr has provided us with an Parallel Programmer.
This project uses CH341a as parallel memory programmer. It requires 2 additional MCP23017 running on (i2c).
The project also includes a GUI based on C# for controlling the programmer.
Here are the contributions:
- Project Repository : https://github.com/DSchndr/ch341a_parallelprog
- This project also contributes a C# based GUI to help in programming target ICs.
- Github User eternalphane has shared with us a link to SNANDer - Serial Nor/nAND/Eeprom programmeR. This is a tool designed by McMCCRU. This is a nice command line program for working with I2C/SPI EEPROM chips. This project presently is supported only on Linux as per the repository. Hope that there are ways to compile it for Windows and Mac.
Here are the contributions:
- Project Repository : https://github.com/McMCCRU/SNANDer
The Main uses that this chip finds is programing SPI flash chips. These SPI flash chips are often used in the BIOS of many computer cards. In fact most of the WiFi routers use these SPI flash chips to store the embedded Linux image. So ideally these programmers can actually help you swap the Linux image on a WiFi Router. Also it has been reported that this programmer can be used to recover bricked or locked out BIOS from laptops.
Lets look at how the programmer looks like:
Source: https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html
Folks at Onetransistor have been kind enough to provide a schematics also:
Source: https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html
Source: https://www.onetransistor.eu/2017/08/ch341a-mini-programmer-schematic.html
We have downloaded the drivers from Jiangsu QinHeng Ltd Website hence all should be Genuine Drivers , malicious items free.
- CH341-Windows-SPI-I2C-Driver+SDK-library/CH341PAR.ZIP - For the programmer
- CH341-Windows-Serial-Driver+SDK-library/CH341SER.ZIP - Serial Driver
Most of the times you would not need any driver specifically since its auto registered. However to communicate you might need the help of libraries.
- CH341-Linux-SPI-I2C-Driver+SDK-library/CH341PAR_LINUX.ZIP - For the Programmer
- CH341-Linux-Serial-Driver+SDK-library/CH341SER_LINUX.ZIP
It's interesting that the manufacturer actually provides support Android support. Not only that they provide the Android application to test and the Library in .jar
form.
There is not much support for MAC from the manufacturer.
We still did not find any clean programmer application, that does
not contain any viruses. Hence if any one can help us provide a clean
programmer application - please let us know.
We have finally found one piece of closed source software for programming. This was contributed by Github User BigBox2020. Another is usbASP Flash Programmer .aka. AsProgrammer. This is an Open-Source alternative contributed by Alexander Gavrilov.
Please find the links to the respective contributions below.
Here are few Open-source projects targeting this platform:
- https://github.com/setarcos/ch341prog
- https://github.com/stefanct/ch341eepromtool
- https://www.flashrom.org/Flashrom
Contribution by Alexander Gavrilov
Here are few more Open-Source projects shared with us by Alexander Gavrilov
- OpenSource usbASP Flash Programmer .aka. AsProgrammer https://github.com/nofeletru/UsbAsp-flash
Alexander Gavrilov has confirmed that AsProgrammer is very common among the Russian users. This has a good GUI and works better than the closed source version as per Issue #5.
- Avrdude version supporting CH341a https://github.com/Alx2000y/avrdude_ch341a
Here are a few Close-Source links shared with us by Alexander Gavrilov
- Ch341Programmer http://televid-sib.ru/index.php?topic=42039.msg161311;topicseen#msg161311
- Colibri http://apkservice.ru/articles/page,1,7,28-soft-dlya-programmatora-na-ch341a.html
- Postal3 https://monitor.net.ru/forum/threads/436716/
- postal3_ch341 http://docs.expressvl.ru/postal3_ch341.html
Contribution by Github User BigBox2020
Here are a few Closed-Source links shared with us by Github User BigBox2020:
- Ch341 programmer v1.13 https://drive.google.com/file/d/0ByEQKtsOckWBUVBqajZOUGtLcnM/view
- Video Tutorial on using Ch341 programmer v1.13 https://www.youtube.com/watch?v=L0ChYNwunUE
- Ch341 programmer v1.13 has been verified using Virus Total service: https://www.virustotal.com/gui/file/0b6aba1bfa041ea3484cb4e6750427de468ece553a9461dba388fee16ad3669a/detection
Here are a few Open-Source tool flashrom links shared with us by Github User BigBox2020:
- flashrom for windows Tutorial and package https://www.win-raid.com/t796f16-Guide-Using-CH-A-based-programmer-to-flash-SPI-EEPROM-5.html#msg41915
- How to do HP PAVILION 500-0XX/ENVY 700-0XX BIOS RECOVERY https://vdhout.nl/2018/02/hp-pavilion-500-0xx-envy-700-0xx-bios-recovery
- Note that the flashrom has been verified using Virus total: https://www.virustotal.com/gui/file/0eb1e5cde08fa44e015c5b56d01e330078a32b4efad4336513ee789f974b559c/detection
Contribution by Github User DSchndr
This project uses CH341a as parallel memory programmer. It requires 2 additional MCP23017 running on (i2c). The project also includes a GUI based on C# for controlling the programmer. Here are the contributions:
- Project Repository : https://github.com/DSchndr/ch341a_parallelprog
- This project also contributes a C# based GUI to help in programming target ICs.
Contributions by Github User McMCCRU, Thanks to Github User eternalphane for sharing this link.
SNANDer - Serial Nor/nAND/Eeprom programmeR - This is a nice command line program for working with I2C/SPI EEPROM chips. This project presently is supported only on Linux as per the repository. Hope that there are ways to compile it for Windows and Mac. Here are the contributions:
- Project Repository : https://github.com/McMCCRU/SNANDer
Please feel free to contribute anything you believe would be helpful for the community.
Current parts that need help:
- Verifying closed source CH341a Programmer Application listed Last time we removed the items since community complained of virus contained in some distributions. We request help to verify the programmer solutions are safe to use before hosting them here.
- Translation We need help with correct translation of documentation. This might be from other languages to common English.
- Tutorials We need help with tutorials for building and using Open Source or Closed-Source applications for CH341a Programmer Application.