Close

Starting to work on the HC12

A project log for eForth for cheap STM8S gadgets

Turn cheap stuff from AliExpress into interactive development kits!

Thomas 05/01/2017 at 18:422 Comments

The HC12 is a Si4463 based RS232-RF modem in 433 ISM band. Compared with the average garage door remote RF solution the Si4463 is much more advanced (range, modulation modes, immunity to noise). It has so many features that the normal way to program it is to use a code generator provided by Silicon Labs, the manufacturer of the chip.

The other chip on the board is an STM8S003F3P6, and that's why I write about it. Some time ago @ajlitt forked the STM8EF repository to work on the HC12. He did the reverse engineering, and wrote first code to make the STM8S talk to the Si4463 (a mix of board-support code, and Forth). However, he had planned to implement a packet radio protocol that needs more RAM than the STM8S has to offer.

I have a much more humble use case: bring Forth into the STM8S of the HC12, and have it communicate with an off-the-shelf HC12 through the Si4463 radio.

Some time ago I ordered 3 x HC12 modules that now have the following roles:

The HC12 connected to the logic analyzer is necessary to understand, and re-implement the Si4463 API calls and parameters.

I now implement the initialization, and the communication routines. There is an "issue", and some docs on GitHub.

Discussions

Arsenijs wrote 05/12/2017 at 22:00 point

I just found the HC12, came to this project to tell you it has an STM8, but it appears you guys got here first =)

  Are you sure? yes | no

Thomas wrote 05/13/2017 at 06:37 point

Hehe nice! Get a pair of them - it's fun!

  Are you sure? yes | no