CH32V003J4M6 is the smallest version of the CH32V003 – a 48 MHz RISC-V in an 8-pin SOP8 package. It fits where you would otherwise use an ATtiny85, just with more performance and memory.
Nine GPIO are squeezed onto six free pins, though, so some pins are connected internally – the diagram shows which.
Specifications
- RISC-V (QingKe V2A) at 48 MHz
- 16 kB flash, 2 kB SRAM
- 6 I/O pins (PD6/PA1 and PD4/PD5/PD1 share a pin)
- USART, I2C, ADC, PWM (no SPI in this package)
- 3.3 V or 5 V supply
- single-wire programming (SWIO)
- SOP8 package
It is programmed with the WCH-LinkE, just like the larger versions. The CH32V002J4M6 is pin-compatible.
Pinout and pin table
Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.
| Pin | Name | Direction | UART | I2C | PWM | ADC | Remap | Note |
|---|---|---|---|---|---|---|---|---|
| 1 | PD6/PA1 | input/output | RX | T1CH2 | A6/A1 | PD6 – 2: TX; 3: T2CH3 | PA1 – 2: T1CH2 | Shared pin – PD6 and PA1 (OSCI crystal); use only one of them; PD6: A6, RX; PA1: A1, T1CH2, OSCI, op-amp input −0 | |
| 2 | VSS | – | ||||||
| 3 | PA2 | input/output | T1CH2N | A0 | 1: ADC trigger (AETR2); 2: T1CH2N | Krystal (OSCO); op-amp input +0 | ||
| 4 | VDD | input | Power 3.3 V or 5 V | |||||
| 5 | PC1 | input/output | SDA | 1: T1BKIN, T2CH4; 2: T2CH1ETR; 3: T1BKIN, T2CH1ETR, RX | 5 V tolerant | |||
| 6 | PC2 | input/output | SCL | 1: ADC trigger (AETR), T2CH2, RTS; 2: T1BKIN; 3: T1ETR | USART RTS; T1BKIN; 5 V tolerant | |||
| 7 | PC4 | input/output | T1CH4 | A2 | 1: T1CH2N; 2: T1CH4; 3: T1CH1 | clock output (MCO) | ||
| 8 | PD4/PD5/PD1 | input/output | TX | T2CH1ETR/T1CH3N | A7/A5 | PD4 – 2: T1ETR; 3: T1CH4 | PD5 – 2: RX; 3: T2CH4 | PD1 – 1: SCL, T1CH3N, RX; 2: T1CH3N | Shared pin – PD4, PD5 and PD1 (SWIO – programming); use only one of them; PD4: A7, T2CH1ETR, USART CK, op-amp output; PD5: A5, TX; PD1: T1CH3N, SWIO, ADC trigger (AETR2) |
What to watch out for
- Pin 8 connects PD4, PD5 and PD1 (SWIO) – always use only one of them and leave the others as inputs.
- Pin 1 connects PD6 and PA1 – same rule.
- SWIO (PD1) shares a pin with other GPIO – if your program switches it to an output, uploading fails. Account for this in your code.
- Logic levels follow the supply voltage (3.3 V or 5 V).
CH32V articles on chiptron.eu/
These chiptron.eu/ articles cover the CH32V chips:
- CH32V003 in the Arduino IDE and on Linux – WCH-LinkE programmer, openOCD and the CH32fun alternative
More pinouts
See all pinouts on the Pinouts page.