FXOS8700CQ Interrupt output generation to wake the PIC18 microcontroller

Thread Starter

paple13

Joined Feb 2, 2023
5
I am using FXOS8700CQ sensor and PIC18 microcontroller. I need only interrupt trigger output to PIC18, no need anything else. I tested that the register is written perfectly. but no interrupt output found. I have been tried for last 3 days but not solved yet. please check my bellow code and simple schematic attached.

void main(void) {

FXOS8700CQ_writeReg(FXOS8700_REGISTER_CTRL_REG2, 0x40); // Reset all registers to POR values
__delay_ms(1);
FXOS8700CQ_writeReg(FXOS8700_REGISTER_XYZ_DATA_CFG, 0x00); // +/-2g range with 0.244mg/LSB
FXOS8700CQ_writeReg(FXOS8700_REGISTER_MCTRL_REG1, 0x1F); // Hybrid mode (accelerometer + magnetometer), max OSR
FXOS8700CQ_writeReg(FXOS8700_REGISTER_CTRL_REG2, 0x02); // High Resolution mode
FXOS8700CQ_writeReg(FXOS8700_REGISTER_CTRL_REG3, 0x02); // Push-pull, active High interrupt
FXOS8700CQ_writeReg(FXOS8700_REGISTER_CTRL_REG4, 0x1D); // DRDY, Freefall/Motion, P/L and tap ints enabled
FXOS8700CQ_writeReg( FXOS8700_REGISTER_CTRL_REG5, 0x01); // DRDY on INT1, P/L and taps on INT2
FXOS8700CQ_writeReg( FXOS8700_REGISTER_CTRL_REG1, 0x35); // ODR = 3.125Hz, Reduced noise, Active mode


while(1)
{

}
return;
}


please check where is the issue. Thanks
 

Attachments

Top