Hi All,
This is my first post on the forum, so bear with me. I have read through many many posts on this forum about ATtiny and interrupts but could not find a solution.
Right now I have an ATtiny84 that flashes an LED during normal operation (loop) and a switch on the RESET pin (physical pin 4) toggles the power state in/out of sleep mode. This works great, but I want to also be able to wake up the ATtiny84 from a change of state on one of the pins (let's say PCINT1, or physical pin 12). The issue I think I am having is that the ISR doesn't run when the ATtiny is sleeping, so it doesn't do anything. I have also read Nick Gammon's code here: Gammon Forum : Electronics : Microprocessors : Interrupts
but I don't want the ATtiny to sleep after blinking the LED once; I want the code in loop() to run constantly until the ATtiny is turned off, then wake it up via a change of state on the interrupt pin. Also, if the ATtiny is already on, the interrupt should have the ATtiny remain on (and not toggle it off).
This is the code I am using right now:
#include <avr/sleep.h>
#include <PinChangeInterrupt.h>
#define LED 10 // Physical pin 2 on ATtiny84
#define SWITCH 1 // Physical pin 12
int Power __attribute__ ((section (".noinit")));
void PowerDown() {
set_sleep_mode(SLEEP_MODE_PWR_DOWN);
ADCSRA = 0; // Turn off ADC
sleep_enable();
sleep_cpu();
}
void setup() {
Power = !Power;
if (!Power) PowerDown();
pinMode(SWITCH, INPUT_PULLUP); // Connect switch to GND to run ISR
pinMode(LED, OUTPUT);
attachPCINT(digitalPinToPCINT(SWITCH), wakeUp, CHANGE); // Pin change interrupt
}
void loop() {
digitalWrite (LED, HIGH); // Flash LED during normal operation
delay(250);
digitalWrite (LED, LOW);
delay(250);
}
void wakeUp() {
// I want to wake up the ATtiny84 when SWITCH is momentarily connected to GND
}
Any help would be much appreciated!

