I was wondering if anyone could point me to a resource for using dsPIC33 MCU's as I2C slaves. I configured it as a slave with the Microchip Code Configurator as well as the peripheral library, but neither of them has been able to give me an interrupt.
I have set I2C2 to be used on the default pins as opposed to the alternative pins, set them as digital inputs, enable the I2C2 module, set interrupt priorities, cleared the flag, enabled the I2C2 slave interrupt, and enabled global interrupts overall. The interrupt vector I am using is "_SI2C2Interrupt".
What I am doing is changing the duty cycle of the PWM module to 50% when the interrupt occurs, but it never occurs. I am using a BusPirate to send a write command (with the programmed address) to the dsPIC33 and I have confirmed that the signal is indeed there with an oscilloscope, but there is no response. I'm thinking there should be an interrupt for the START, STOP, and address match events, but nothing happens.
If someone could help, that would be lovely.