I'm trying to interface with an MCP2515 CAN controller ( http://ww1.microchip.com/downloads/en/DeviceDoc/21801G.pdf
) and use the interrupts generated on RX0BF and RX1BF to signal when data is ready to be read out of the buffers.
I've connected the two RXnBF pins to 18 and 19 on the mega, and used the following code during setup to attach to the interrupts:
attachInterrupt(5,intReadRX0,FALLING); // Attach interrupt functions
When I monitor the voltage on the relevant pins with a scope/meter, it does drop when the buffer is full however the interrupt functions (intReadRX0 and intReadRX1) never seem to fire. If I attach pins 18 and 19 to another pin and generate an interrupt signal myself (digital write high > low > high) then it does get picked up and the function runs.
Am I missing something obvious? I've tried with and without a pull-up resistor (had a 33k to hand, so went with that), I've tried different interrupt pins on the mega and as I've said, I've tried monitoring the state of the line with extra equipment to make sure the voltage does drop when the buffer is full.