Flash Programmer Shows Some Nifty Tricks

A handy tool to have on the bench is a Flash chip programmer, and the ones based around the CH341A USB bus converter chip are readily available. But the chip is capable of so much more than simply programming nonvolatile memory, so [Tomasz Ostrowski] has created a utility program that expands its capabilities. The software provides easy access to a range of common i2c peripherals. He’s got it talking to smart batteries, GPIOs, environmental sensors, an OLED display, and even an FM radio module. The code can all be found in a GitHub repository. The software is Windows-only so no fun and games for Linux users yet — but since it’s open source, new features are just a pull request away.

The CH341A is much more than an i2C controller, it also supports a surprising range of other interfaces including SPI, UARTs, and even a bidirectional parallel printer port. Maybe this software will serve to fire the imagination of a few others, and who knows, we could see more extended use of this versatile chip. Oddly we’ve featured these programmer boards before, though in a tricky flashing job.

12 thoughts on “Flash Programmer Shows Some Nifty Tricks

    1. As this particular example shows reading AVR signature and fusebits, maybe https://github.com/maxxproff/avrdude-ch341 or https://github.com/Alx2000y/avrdude_ch341a would be interesting for you.
      I was wondering for a minute why GPIO instead of SPI was used here (for avrdude there are actually both modes), but it looks like CH341A SPI might be limited to single speed, 1.4 MHz (https://github.com/gschorcht/spi-ch341-usb/blob/master/README.md).

    1. Good grief. The Adafruit one ($37) says it’s discontinued, but links to another model–which costs $60, and is also discontinued, but links to another model–which is $100.

      Sparkfun seems to have the Bus Pirate v3.6a in stock for $32.50.

      The links from the DP site to Seeed Studio all take me to “you have been blocked by CloudFlare”, but going to their home page and searching work, but both versions are still out of stock.

    2. IIRC the chip shortage caused Bus Pirate’s discontinuance, and Adafruit has/had a Kickstarter campaign for an RP2040-based reimagining/spiritual successor to the Bus Pirate. Could be pretty slick.

      1. Isn’t the Bus Pirate source code open-source? The chip shortage appears to be abating, so maybe we will see more PIC micro-controllers re-stocked in the future; or if it hasn’t happened already, we will get cloned PIC chips from China.

  1. Today there are dirt cheap 8-ch 24 MHz logic analyzers compatible with the free open-source cross-platform Sigrok/Pulseview software.[1][2] The logic analyzer hardware is available from Amazon [3] or any of your usual slow-to-ship Chinese parts vendors.

    * References:

    1. Sigrok

    https://sigrok.org/wiki/Main_Page

    2. PulseView

    https://sigrok.org/wiki/PulseView

    3. HiLetgo USB Logic Analyzer Device With EMI Ferrite Ring USB Cable 24MHz 8CH 24MHz 8 Channel UART IIC SPI Debug 4.5 out of 5 stars 442 ratings 100+ bought in past month $12.69

    https://www.amazon.com/HiLetgo-Analyzer-Ferrite-Channel-Arduino/dp/B077LSG5P2/

  2. Version 1.1 is released, adding support for HD44780 over GPIO, HD44780 over I2C (PCF8574), AHT10/AHT20 temperature/humidity sensors, raw SPI data reading/writing, MAX7129 8×8 LED matrix display, AS5600 magnetic angle sensor.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.