Close

Encoding

A project log for Morse blinking jewelry

A proof that the PIC10F200 can be useful after all.

yann-guidon-ygdesYann Guidon / YGDES 03/26/2018 at 10:580 Comments

The PIC10F has a very, very small addressing space. The PIC10F200 has only 256 instructions in Flash memory and virtually no SRAM space. The message must be stored in the program space as a RETLW array.

The program space must also store the decoding code so the simpler, the better. For example, it's not possible to store a ASCII->Morse translation table. So the message must be stored in a pre-encoded format that is both compact and straight-forward to interpret.

I have chosen to limit the Morse "characters" to 5 tics, and the number 5 fits in 3 bits. Hence 5+3=8 and a character fits in a byte.

The translation is performed during assembly with a list of #define so the software is very simple and no storage is lost. The whole program is less than 60 instructions...

Discussions