Close

Firmware from zero, debugged through seven segments

A project log for Oh No, Not Another Microwave Spot Welder

I didn't just rewind the microwave transformer — I kept its control board and rewrote the firmware to run a spot welder.

wicherswichers 2 hours ago0 Comments

With the flash blank, everything had to be written from scratch: startup code, interrupt vectors, display driver, encoder handling, menu, timers. The toolchain is Toshiba's 2009-era TLCS-870/C1 IDE with the cc870c C compiler — C89, 2 KB of RAM, no debugger, no UART free for printf (the UART pins are the programming interface).

The only output device is the 4-digit 7-segment display. So the display became the debug console. display_hex16() shows any 16-bit value as hex (the segment font grew letters A–F), and a compile-time diagnostic mode turns the encoder into a channel selector: millisecond counter, raw timer capture register, interrupt counter, register readbacks. It sounds primitive. It found every bug in this project.

The board mapping came first — tracing which MCU pins drive the display digit selects

Discussions