Editor Version ×
recommended

Pro Edition

free

Brand new interactions and interfaces

Smooth support for design sizes of over 3W

devices or 10W pads

More rigorous design constraints, more

standardized processes

For enterprises, more professional users

Std Edition

Easy to use and quick to get started

The process supports design scales of 300

devices or 1000 pads

Supports simple circuit simulation

For students, teachers, creators

Ongoing

PRO CH32V003 Tristate Multiplexing LED

CH32V003 Tristate Multiplexing LED

Project tags

License

Public Domain

License: Public Domain

Mode:

Mode

Editors' pick

Editors' pick

  • 1.4k
  • 0
  • 3
Update time: 2023-08-13 03:34:04
Creation time: 2023-08-06 02:57:24
Description

Description

# CH32V003 Tristate Multiplexing LED CH32V003J4M6 (SOP-8) drives a 5x6 LED matrix with only 6 GPIOs. - GitHub: [https://github.com/limingjie/CH32V003-Tristate-Multiplexing-LED](https://github.com/limingjie/CH32V003-Tristate-Multiplexing-LED) - YouTube: [LED Chaser Terminator - Low-Cost CH32V003 MCU Drives a 5x6 LED Matrix with 6 GPIOs - 555 Timer RIP!](https://www.youtube.com/watch?v=1Sye0EghZRU) - Bilibili: [Ultra Low-Cost LED Chaser - 6 GPIOs Drive a 5x6 LED Matrix](https://www.bilibili.com/video/BV1tz4y1g7z6/) I programmed 5 boards to show running words. But as there is no synchronization among the boards, the boards will soon run out of sync. ## How it works The program uses the [Tristate Multiplexing (Charlieplexing)](https://en.wikipedia.org/wiki/Charlieplexing) technique to drive LEDs. Each GPIO is used as both row and column lines, so n GPIOs support `n x (n - 1)` LEDs. There is only one LED light at a time, and each LED supports 16 brightness levels. The program uses `SysTick` to update the LED matrix 50,000 times per second, so each LED updates at 50,000/30/16 = 104Hz, which is fast enough for human eyes to notice. ## Programming To program the CH32V003 microcontroller, you will need a programmer that supports SWD. - The official [WCH-LinkE](https://www.wch-ic.com/products/WCH-Link.html) programmer. - Check [CNLohr's ch32v003fun](https://github.com/cnlohr/ch32v003fun) project for other options, such as ESP32S2 and Arduino-based programmers. ## Compiling and Uploading (macOS) Install [RISC-V Toolchain](https://github.com/riscv-software-src/homebrew-riscv). ```shell brew tap riscv-software-src/riscv brew install riscv-tools ``` This project uses the `minichlink` utility to upload, so the `libusb` is required as a dependency. ```shell brew install libusb ``` Clone the project, connect the board to the programmer, then run the `make` command to compile and upload the firmware. ```shell git clone https://github.com/limingjie/CH32V003-Tristate-Multiplexing-LED.git cd CH32V003-Tristate-Multiplexing-LED make ``` ## Build `minichlink` Utility (macOS) The `minichlink` utility in the `tools` library is built for `x86_64`. If your macOS runs on Apple Silicon, you can build the `minichlink` utility and copy it to the [tools](https://github.com/limingjie/CH32V003-Tristate-Multiplexing-LED/tree/main/tools) folder. ```shell brew install pkg-config brew install libusb git clone https://github.com/cnlohr/ch32v003fun.git cd ch32v003fun/minichlink make ``` ## References * [Stefan Wagner: CH32V003 RISC-V Mini Game Console](https://github.com/wagiminator/CH32V003-GameConsole) * [CNLohr: ch32v003fun](https://github.com/cnlohr/ch32v003fun) * [Stefan Wagner: TinyProbe - Logic Probe based on ATtiny13A](https://github.com/wagiminator/ATtiny13-TinyProbe) * [David Johnson-Davies: Twelve PWM Outputs from an ATtiny85](http://www.technoblogy.com/show?2H0K) * [Wikipedia: Charlieplexing](https://en.wikipedia.org/wiki/Charlieplexing)
Design Drawing

Design Drawing

schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
Empty
Project Attachments

Project Attachments

Empty
Project Members

Project Members

Target complaint
Related Projects
Change a batch
Loading...

Comment

Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn