I am using the ADXL362 with an ATTINY85
I want to run the script for a certain period then a) put the ADXL362 into wakeup mode and next b) put the ATTINY85 into power down sleep mode.
I would then like the ADXL362 to wake up the ATTINY85 if it detects motion over a certain threshhold. Because I have no spare pins on the ATTINY85 I would like to use its reset pin, so I need the 362 interrupt1 pin to be held high while it's asleep then go momentarily low when the 362 wakes up. Is this possible? Here is what I have so far:
//Set the ACT_INACT_CTL bit 1
//Set the threshhold and time
SPIwriteTwoRegisters(0x20, 300);//300 is the threshhold
SPIwriteOneRegister(0x22, 10); //10 is the time
// Map awake status to interrupt 1
// set autosleep bit
//put in wakeup mode
It doesn't work: Interrupt 1 on the ADXL362 goes high as it powers down, but subsequent motion has no effect. What am I doing wrong?