Turns out that the circuit only/always worked in the morning. I was (un)luckily that I happened to do my first test in the morning or none of this would have ever happened. But how did the circuit know what time of day it was with out any real-time clock access?
Thanks to the sun streaming though my window each morning. But how is this incredibly simple circuit light-aware without any sensors (or associated software) of any kind?
It is all thanks to the innocent looking indicator LED. When the sun hits it, it generates an extremely tiny current thanks to the photoelectric effect. But how is that powering the RAM when the LED is connected to an IO port pin?
AVR microcontrollers have clamping diodes on the input pins. My bet is that this tiny current is running thought the high end diode into the internal Vcc bus on the chip and that is keeping the RAM alive. But could that tiny LED current really be enough to sustain the RAM indefinitely?
Apparently so. Keep in mind that this chip is spec’ed to use less than 0.15ua in power down mode. That is an vanishingly small amount of current. I actually backed uCurrent on KickStarter, so when it comes I’ll try to measure the current coming out of the LED and update this post with what I find.
In the mean time, I was able to easily test this theory using a flashlight. When the flashlight is shining onto the LED, the RAM persists infinitely. With the flashlight off and windows shades drawn, the RAM decays in less than 150ms.