AST-CAN485 interrupt not working

Can you confirm that you installed the AST CAN485 board in the Arduino IDE per the instructions found here - https://learn.sparkfun.com/tutorials/as … 1591668599 - under the section Board Installation Using the Boards Manager?

Yes I followed those instruction.

I still have this question don’t have avr/io or avr /interrupt files anyway in my PC

Ok, the next thing I suggest is set the preference of your Arduino IDE to verbose for compilation. Then compile your sketch and post the results that appear in the status window. I think this might help identify which files may need updating.

Did the verbose. It’s loading Arduino package. Not sure what I look for file attached.

But notice this in pins_arduino.h

//#define digitalPinToInterrupt(p) ((p) == 2 ? 0 : ((p) == 3 ? 1 : NOT_AN_INTERRUPT))

#define digitalPinToInterrupt(p) (((p) >= 6 && (p) <= 9) ? ((p) - 2) : (((p) == 2) ? 0 : (((p) == 3) ? 1 : NOT_AN_INTERRUPT))) // AST done

I’m not seeing a file attached, but you’ll want to look for a line that includes the string WInterrupts.c. This line is the command line that compiles that file to create the object file containing the attachInterrupt() function which includes the wiring_private.h file. That line will show the location of those files. Please confirm that the wiring_private.h file that you edited previously is the one in that location.

The code you mention is what maps the pin you’re trying to use, pin 9, into the INT7 external interrupt.

Winterrupt.c --calls

#include <inttypes.h>

#include <avr/io.h>

#include <avr/interrupt.h>

#include <avr/pgmspace.h>

#include <stdio.h>

#include “wiring_private.h”

But I cannot find avr/io.h or avr/interrupt.h file on my PC

Those files should be located in the folder <arduino_ide_install>\hardware\tools\avr\avr\include\

Hi M,

Found the file. I am kinder given up with this interrupt issues. I cannot get this on the pins I want reliably.

Thanks for the help so far.

Ok, sorry I wasn’t able to help you get it working. Good luck on your project!