2

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?

asked Aug 16, 2018 at 17:16

1 Answer 1

1

No gotchas I can think of, except for the fact that the ATtiny's memory will be re-initialized every time you reset it. But I assume you are aware of that.

Note that, if you want some data to be preserved across a reset, it is possible using either the on-chip EEPROM or the .noinit section of the RAM.

gre_gor
1,6824 gold badges18 silver badges28 bronze badges
answered Aug 16, 2018 at 19:03
1
  • You can also use the EEARL and EEARH registers to store 2 bytes between resets, as those retain their value between resets. This behavior however isn't specified in the datasheet, so not really advised for critical/professional applications. Commented Aug 18, 2018 at 18:28

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.