AnsweredAssumed Answered

ADXL362 interrupts

Question asked by robertjenkins on Jun 14, 2014
Latest reply on Jun 17, 2014 by robertjenkins

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

SPIwriteOneRegister(0x27, 0x01);


//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

  SPIwriteOneRegister(0x2A, 0x40);


// set autosleep bit

  SPIwriteOneRegister(0x2D, 0x02);


//put in wakeup mode

SPIwriteOneRegister(0x2D, 0x04);


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?