CForth based USB/DMX controller with STM32G431

This is an experimental approach for a minimal user programmable USB/DMX512 controller with rather complex self-contained possiblities to create auto-running lighting sequences.

This device it is not intended for big stage shows. But the CForth interpreter provides possibilities to create time based and sensor controlled animated lighting art objects or light installations for buildings or similar.
photo of breadboard
     USB/DMX controller on PCB (63x25mm)

A hardware DIY manual for this USB/DMX controller
is described in detail at another place of this website.

The firmware is a special version of the
CForth interpreter with an additional set of DMX related kernel operators (Forth "words") as:

--- select the DMX channel ("slot") for subsequent actions

--- set DMX levels by different methods

--- set the fade time for DMX level transitions

--- "Panic" switch: all DXM levels to zero

--- up to 65 lighting scenes can be saved in Flash and reloaded.

--- read actual DMX levels ASCII text formatted via terminal

Most essential features of the small CForth-DMX module:

  • The terminal is provided via USB as virtual COM port
  • With an external USB connector power bank, standalone operation is possible.
  • For this reason, an AUTOEXE feature is implemented, which starts a complex program sequence at power on.
  • Some manual control of a running show is possible via terminal.
  • Up to 65 lighting scenes can be stored permanently in the microcontroller flash and can be reloaded completely or in parts by CForth command.
  • In addition to DMX bus control, some analog or digital inputs, 1 DAC are provided and handled by CForth kernel operators
  • An SPI interface, an I2C bus and two PWM pulse outputs are supported by firmware and externally accessible via connector array.
  • As an alternative to CForth control, the firmware supports the MiniDMX protocol (selectable with a jumper on the PCB).
A detailled CForth Operating Manual is provided here (PDF file), DMX related instructions are on the last page

The subsequently downloadable material is copyrighted (c)2020 by Wolfgang Schemmert.
Assembly of the devices, programming and use of the software is permitted for free by everybody for any purpose ("freeware"). For commercial use, possible restrictions of third-party software contributors must be respected.
All information is based on best knowledge, but "as is" and without any warranty. Any responsibility is excluded. Use for dangerous, life-threatening and medical applications is forbidden.

PCB layout for the "STM32G431 board" PCB (1:1 TIF format. BOTTOM layer as well as component placement view are "from component side", i.e. BOTTOM layer shown mirrored "through the PCB" (as needed for PCB production))

Firmware "CForth-G431-MINI.hex" for "small USB/DMX conroller"
(Version 2.47 , 05 August 2020 - USB Tx buffer overflow at 144MHz fixed + minor improvements)

Source code "" (state 05 August 2020)
This source code is provided as complete "Segger Embedded Studio" project (ZIP file, 721 kB. Parts published by Segger are under license of Segger&|Rowley, parts published by STM are under license of STM, parts programmed by me are provided under GNU GPL3 license.)

This project is programmed directly on register level, no external libraries (except "cmsis" and startup code), no external drivers or HAL are used.

* State of information August 2020.
* Right of technical modifications reserved. Provided 'as is' - without any warranty. Any responsibility is excluded.
* This description is for information only. No product specifications are assured in juridical sense.
* Trademarks and product names cited in this text are property of their respective owners.