Attiny13 edge triggered interrupt wake-up from Power Down

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Having read the doc a couple of times, it seems that an external edge-triggered interrupt for Attiny13 can ONLY be implemented for wake-up from Power-Down IF using external clock. Is that the case, or have I misinterpreted things? That seems logical, as there is no clock running to latch the signal. On the other hand..., the low level interrupt (INT0) will apparently will work with no clock?

TIA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That IS correct, as I understand it.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not quite... for power down, only a level interrupt on INT0 can be used to wake the device. To wake from an edge triggered event, you would need to use the pin-change interrupt, and you will be waking on any edge. The clock source has no effect on this mode of operation. For edge triggered events on INT0 you need the I/O clock running, which means the oscillator, beit internal or external, is running and consuming power. So the only sleep mode you can use to wake on an edge triggered event on INT0 is Idle Mode.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the replies. Glitch, I think you have answered my question, but I am having some difficulty understanding. When you say

Quote:

for power down, only a level interrupt on INT0 can be used to wake the device

that seems explicit. Or, do you mean:
"Using INT0, *only* a level interrupt can be used for Power-Down wake-up"?
Surely that is what you meant, no? Because you say
Quote:

To wake from an edge triggered event, you would need to use the pin-change interrupt

And the ATtiny doc says the same:

"Pin change interrupts on PCINT5..0 are detected
asynchronously. This implies that these interrupts can be used for waking the part also from sleep modes other than Idle mode."

I'm not being argumentative..., just dense, and the Atmel doc seems (to me) to be an endless loop. The doc suggests that using pin-change that it IS possible to wake-up from Power-Down by edge detection (that is to say, a change of level).

I'll be more explicit about my potential application; it will be necessary to wake the Attiny from Power Down. The signal to do that will be an edge (either polarity, my choice), but that signal will be fleeting..., perhaps enduring for less than the period of the Attiny clock. FWIW, I have an external clock available that *could* be used to drive the Attiny. The low-level interrupt behavior of INT0 seems extraneous, aside from being informational..., I should not have mentioned it.

On the one hand, I'm inclined to believe that I've over-thought this (which I often do), and that it is a straightforward deal. Just use pin-change PCINT5..0, and wait for an edge (i.e., a level change)to come along.

On the other hand, maybe it's not so simple.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

yes you can use the pin-change interrupt as a wake-up from power-down. And yes I meant that if you are using INT0, only the level triggered mode can be used as a wake-up source from power-down mode.

Yes for your application, sounds like pin-change is the way to go, but realize that you cannot select which edge... the AVR will wake on ANY edge.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, you can use pin change interrupts to wake up from power down. I've used this myself a couple of times to wake up the device on button presses.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok.., great guys. Thanks for you patience. The triggering signal remains at a fixed level until interrupt time, so that should work.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a project in the project place that uses the wakup.
Nikon IR release and automatic delay button

https://www.avrfreaks.net/index.php?module=Freaks%20Academy&func=viewItem&item_type=project&item_id=1434