/stc89c52-demos

A collection of demos for the STC89C52 chip that go along with my ongoing blog series about 8051 micro-controller derivatives.

Primary LanguageMesonApache License 2.0Apache-2.0

A Collection of STC89C52 Demos using SDCC

See this blog entry for the start of the series and background for this code.

Prerequisites

Building

meson build
ninja -v -C ./build

Flashing

These examples use stcgal as flashing tool. Flashing for particular versions of the firmware can be done via ninja. My BSL version of the chip was not supported by the mainline stcgal, nrifes version seemed to work better.

# Power target off
ninja -v -C ./build flash_<hexname>
# Power target on
# Power-cycle target to see new firmware running

Demos

00 Hello World

Hello World

This demo is a simple hello world application that toggles a LED on pin P2.0.

# Flash using ...
ninja -v -C ./build flash_00_hello
# Adjust the meson.build file to point to the COM port your serial flasher enumerates to.

Manual boostrap of this example without a dev-kit should be doable as follows.

Hello World Drawing source.


(C) 2022 Thomas Reidemeister