Waking up from power save using INT0

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

Hi - I'm looking at the datasheet for an ATMEGA168PV. I plan on using it in power-save mode frequently. I would ideally like it to be able to wake up both from a change on INT0 and an interrupt on Timer2.

In table 10-1 in the datasheet (page 40), it says it says "For INT1 and INT0, only level interrupt." can wake up the device out of power save.

Table 13-2 in the datasheet (page 69) lists four options for INT0 interrupts: low level, logic change, falling edge, and rising edge.

So it seems like it will definitely not wake up using the last two options. I think it definitely will wake up using the low level option. But what about the logic change option? That is the option that I am most interested in using.

Thanks!

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

Quote:

But what about the logic change option? That is the option that I am most interested in using.

Use pin-change interrupt.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
Quote:

But what about the logic change option? That is the option that I am most interested in using.

Use pin-change interrupt.

Ah - I didn't even realize that note in the table was referring to the other type of interrupt. Looks like that's PCINT18. So I can enable a pin change interrupt on PCINT18 and it'll wake the processor up whenever there is a logic change on that pin, right?

Is there any advantage to using the INT0 interrupt over the pin change? My memory is that INT0 is a bit faster than pin change, right?

Thanks!!

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

Quote:

Is there any advantage to using the INT0 interrupt over the pin change? My memory is that INT0 is a bit faster than pin change, right?

The usual advantage of INTn over PCINTn is you can select amongst rising/falling edge triggers or level triggers but when it comes to waking from sleep INTn's normally only offer level as an option anyway. So actually PCINTn's may be "better" in this sense.

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

Quote:

My memory is that INT0 is a bit faster than pin change, right?

Huh? Are there >>any<< AVR interrupts that are "faster" than any others?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

PCINTs make very good on/off switches :)