I was not done yet. I decided to create a PIC10F200 version of desperate firefly.
The PIC10F200 is the simplest MCU available. As for peripherals it only have an 8 bits timer and a watchdog timer. 256x12bits words of flash memory and 16 bytes of RAM. It run on an 4Mhz internal oscillator. PIC execute instructions in 4 clocks cycles, this means 1 million instructions par second at most because branch and call needs 8 clocks cycles. Although the Fsys frequency can't be reduce to save power, the MCU can be placed in a low power mode using <i>sleep</i> machine code instruction. When in sleep mode the MCU can be reset by the watchdog timer overrun. So in this version the strategy was to put the MCU in sleep mode and use the watchdog timer to reset it at regular interval, set the new status of the LED according to message bitstream stored in flash memory and then put the MCU back in sleep.
The MPLABX project is included in PIC10F200_version on the github repository
I prefer to code these little MCU in assembler.
; LED connected on GP2
; sos message bit counter
constant count=16 ; this is a variable at address 16.
; hardware init
btfss STATUS,NOT_TO ; if a power reset clear count
sos: ; data message 0=LEDoff, 1=LEDon
The measured current drain is very similar to the EFM8BB10F8G version.