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!

ThomasThomas 05/01/2017 at 18:428 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

nateshkannan.s wrote 02/16/2019 at 09:58 point

Hi guys,

i am currently working with HC12, if it is have any data available pin like a DTR.

i am trying to upload the sketch wireless at long distance so i choose HC12. but i can't upload the sketch to my Arduino uno because that boot loader need reset for enter the sketch upload.

If anyone have idea about my concept please let me know,

thank you

with regards

kannannatesh 

  Are you sure? yes | no

Lars Brinkhoff wrote 09/18/2017 at 14:14 point

It's a bit confusing when there's also an mcu called HC12 from Mot... I mean Free... I mean NXP.

  Are you sure? yes | no

jaromir.sukuba wrote 09/18/2017 at 14:23 point

Did you mean Qualcomm?

  Are you sure? yes | no

Lars Brinkhoff wrote 09/18/2017 at 18:14 point

Yikes, I didn't even know Qualcomm was bidding to buy NXP.  Doesn't look like a done deal though?

  Are you sure? yes | no

richard wrote 09/18/2017 at 07:14 point

I've got a pair coming.And a logic analyser. Pure coincidence but now perhaps serendipity. 

  Are you sure? yes | no

Thomas wrote 09/18/2017 at 18:35 point

I bought 3 of them: one to hack code, one to communicate with, and one to trace the original SPI data stream (using a logic analyzer). A couple of things with "higher priority" came my way, but at least I can share some traces. 

  Are you sure? yes | no

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