Software › Button + LED

Button + LED

demo Open · freely redistributable

An original CC0 bare-metal CH32V307 program. It enables GPIOA and GPIOB, configures PA0/PA1 as outputs and PB4 as an input, then polls GPIOB->INDR bit 4: while the user button is held the user LED (PA0) is lit, and LED2 (PA1) blinks as a slow heartbeat. Press B (or the on-screen BTN) to drive the button. Exercises the real GPIO input-data path.

Download ↓

Format: CH32V307 flash image (bare-metal, compiled C)  ·  By: emulators.org  ·  Licence: Public domain (CC0)

Runs on