I have found a lot of partial & complete watchdog/sleep examples, but none for attinyx5 series -- I found (the most helpful example) by Nick Gammon & tried it on attiny85 -- the compiler complained about a variable not being defined ("WDTCSR").
Is there a complete example of using watchdog to wake from sleep on a attiny85? I cannot find one that works (compile errors).
You could take a look at Jack Christensens sleep demo code
I was hoping for an example with watchdog to wake it -- but I will try to merge that w/ other code to try to make a working example.
thank you
The '85 register has a different name: WDTCR. It might be enough just to delete that one letter. Or maybe not.
Libc provides a layer of insulation that should be used (instead of WDTCR)...
https://www.google.com/search?q=_WD_CONTROL_REG+_WD_CHANGE_BIT
http://www.nongnu.org/avr-libc/user-manual/group__avr__watchdog.html
Thanks folks -- I have a semi-working version. (not sleeping as long as it should, but does sleep)