I am designing a low-power RF application using an ATTiny (Adafruit Trinket).
When the system receives a radio signal, it needs to read some sensors, and transmit with that data. Because I am short on pins, I am trying to think of creative (low-pin count) ways to design this system.
My current idea is:
- Put the AVR to sleep.
- Connect the radio's Rx Interrupt pin to the AVR Reset pin
- When the AVR is reset, check the radio buffer
- (if there's nothing in the buffer, assume this is a real power-on reset and go back to sleep)
- Otherwise, read sensors, transmit
- Go back to sleep
My aim here is that the AVR will use very little power while sleeping (furthermore, it will only need to wake up a few times per day).
Is it reasonable to use the AVR reset pin in this manner? Any gotchas to be aware of?