deckle studio
Open the editor
Microcontroller with real firmwareCH32V003F4P6ch32v003

CH32V003F4P6 (RISC-V, firmware)

WCH CH32V003F4P6 on its own (TSSOP-20, 18 GPIOs): RISC-V QingKe V2A (RV32EC), 48 MHz from the internal 24 MHz RC oscillator, 16 KB flash, 2 KB SRAM, 2.7–5.5 V. Real firmware from an Arduino sketch (WCH Arduino core) or ELF: digitalWrite/Read, analogRead (10 bit: PA2 A0, PA1 A1, PC4 A2, PD2 A3, PD3 A4, PD5, PD6, PD4 A7), Serial (USART1: PD5 TX, PD6 RX), millis/delay (SysTick), attachInterrupt (EXTI, the WCH core's attachInterrupt(pin, GPIO_Mode_IPU, fn, EXTI_Mode_Interrupt, EXTI_Trigger_Falling)), analogWrite (TIM1 / TIM2 PWM, 12-bit by default: analogWriteResolution(8) for 0–255), Wire (I²C1: PC1 SDA, PC2 SCL), SPI (PC5 SCK, PC6 MOSI, PC7 MISO); AFIO remaps of USART1, I2C1, TIM1, TIM2 follow the reference manual. On the board: 100 nF (and a few µF) at VDD; no crystal needed; PD1 is the one-wire debug pin (SWIO, to a WCH-LinkE for programming); PD7 can be NRST (option byte), here a GPIO.

VDDVSSPA1/A1PA2/A0PC0PC1/SDAPC2/SCLPC3PC4/A2PC5/SCKPC6/MOSIPC7/MISOPD0PD1/SWIOPD2/A3PD3/A4PD4/A7PD5/TXPD6/RXPD7/NRSTCH32V003F4P6
Schematic symbol

Key data

Category
ICs
Simulation model
Microcontroller with real firmware
Manufacturer part number
CH32V003F4P6
Reference prefix
U
Pins
20
Land pattern
TSSOP-20_4.4x6.5mm_P0.65mm

Simulation model

An emulated CPU core runs the firmware binary instruction by instruction. The GPIO pins are pins of the analog circuit: outputs drive through a driver resistance, inputs read the voltage with thresholds.

Device
ch32v003
Supply pins
VDD / VSS
Mapped GPIO pins
18

Pins 20

PinNameUse
VDDVDDSupply pinSupply input: decouple with 100 nF close to the pin
VSSVSSGround pinGround
PA1PA1/A1I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PA2PA2/A0I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC0PC0I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC1PC1/SDAI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC2PC2/SCLI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC3PC3I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC4PC4/A2I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC5PC5/SCKI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC6PC6/MOSII/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PC7PC7/MISOI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD0PD0I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD1PD1/SWIOI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD2PD2/A3I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD3PD3/A4I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD4PD4/A7I/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD5PD5/TXI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD6PD6/RXI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)
PD7PD7/NRSTI/O pinGeneral-purpose I/O: LEDs (with series resistor), buttons (with pull-up)

PCB

Verified land patternTSSOP-20_4.4x6.5mm_P0.65mm
PackageLand patternStatusSource
TSSOP-20TSSOP-20_4.4x6.5mm_P0.65mmVerified land patternKiCad 10.0.7: symbol CH32V003FxPx, footprint Package_SO:TSSOP-20_4.4x6.5mm_P0.65mm; pads by pin name from the KiCad symbol; CH32V003 datasheet (pinout, supply)
  • VDD 2.7–5.5 V with 100 nF close to the pin