Close

The Past and the Future

A project log for Weighing Scale in <1kB Code

A weighing scale using a ATmega48, a hx711 ADC and a 1x16 hd44780 display.

tinutinu 01/04/2017 at 16:050 Comments

The current firmware is written in C, compiling it optimized for size leads to a 902 byte binary. It uses 20 different characters from the LCD which adds another 100 byte of data. The total size is thus 1002 bytes.

I could reduce the size of the binary by using a custom startup code, here and there a little optimization. But I don't think I'll get it much smaller that way.

So I started writing a version completely in assembler. It has around 520 bytes now. But it also has a number of bugs and I got distracted a bit too often to finish it on time.

Here is a list of features I want to add but they will probably not fit into 1kB:

I hope I find time to implement a few of these ideas.

Discussions