Use CH341A with AsProgrammer on Windows

 Author:   Posted on:   Updated on:  2018-11-25T13:24:01Z
CH341A serial programmers are cheap and quite popular. One of the most used device is the MiniProgrammer. CH341A is a chip with USB port. It can be interfaced with parallel ports, serial ports, I2C and SPI devices. The manufacturer of CH341A chip offers drivers for all operating systems. They even offer API for programmers who want to build software to talk to CH341A. In spite of this, software tools for CH341A are not very easy to find. Linux users have some command line tools, but Windows users had no open source software.

AsProgrammer is a graphical interface tool that can read, erase and write serial memory chips. It has been created by Alexander and it seems to exist since late 2011. It supports for UsbAsp, AVRISP-MKII and CH341A programmers. The utility is released under MIT license and can be downloaded from GitHub – binary releases here. I tested the utility with I2C EEPROM and SPI FLASH chips with success.

Use CH341A with AsProgrammer on Windows
The latest release is from October 2017. Looking at the source code, it is written in Pascal and, for the CH341A, it uses the native API, not libusb. Therefore, it cannot be ported to Linux without code changes.

Download the release archive from GitHub and extract it. The software is portable, no install needed. The archive includes drivers and firmware for all supported programmers.

Connect the programmer to an USB port. In AsProgrammer main window, go to Hardware menu and select CH341a. Then go to IC menu and select the one that you fitted on programmer. If using SPI memory, there’s a question mark button on the main toolbar (Read ID). Click this and it will (probably) detect the chip type, without you needing to choose it from menu.

AsProgrammer is now ready. Use the toolbar buttons to read, write, erase and verify chip (hover the mouse cursor over them to see what the do).

I tested it with 24C02 I2C EEPROM (256 bytes). Reading took less than a second. Programming took 36 seconds. Then I placed a SPI flash on the programmer. I didn’t even bother to see what’s marked on it, I used the Read ID button and it detected EN25F80 (1 Mbyte). Reading took 11 seconds and writing less than 2 minutes. Note that some chips are write protected and you will need to alter protection registers (see the dropdown menu on the Unprotect toolbar button).

The Cancel button does not seem to work when programming a chip. The software features scripting. Documentation and an example can be found in scripts folder. This utility has a forum page, but that is in Russian.

Another programming utility that will (probably) support CH341A in a future release is PonyProg. Check the discussion here.

If regularly using CH341A to program chips, you may want to buy a programmer with voltage level switch between 3.3V and 5V. There are also adapters to 1.8V. It’s important to know that the black MiniProgrammer supplies 3.3V to memory chips placed in the ZIF socket and 5V to CH341A. I2C and SPI bus voltage levels are set to 5V! A workaround that requires some soldering already exists.

Have you ever used AsProgrammer before? I didn’t even know it existed until I found it by chance.

1 comment :

Please read the comments policy before publishing your comment.