Close

Programming and testing

A project log for AVR Watch v2

This is the second iteration of my AVR watch

joe57005joe57005 07/25/2017 at 16:430 Comments

For this step, i used an arduino dumilanove as a programmer.

I'll post my code later, as right now it's ugly. I did program this in the arduino environment, but only because i'm lazy. Be sure to burn the proper fuses first. Arduino set the brown out detection at around 4 volts by default. Obviously this will keep your system from working at 3.7-2.9V, that and the BOD drains around 4mA all the time, so you're going to want it completely disabled. 

I recommend MCUdude's minicore. In arduino preferences, add https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json to your board manager URLs and install minicore from the board manager.

His excellent work will allow you to change individual fuse settings very easily. For this, select atmega328, 8mhz internal clock, 328p variant, and BOD disabled. burn the bootloader and then you can program it however you want. You'll probably want a ws2812 and ds1302 library. Don't forget to keep your AVR asleep when not in use, my whole system uses about 40 micro Amps when asleep, and around 90mA when showing the time. If it was awake all the time, my 110mAh battery would last only an hour at best.

Discussions