FEZ Hydra InterruptPort

Hi, I assign a PIN InterruptPort in PD9 (Socket 9 Pin 3), declare as follows:


void ProgramStarted()
{

  private InterruptPort pin11; 
  pin11 = new InterruptPort(FEZHydra.Pin.PD9, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeBoth);

  pin11.OnInterrupt += new NativeEventHandler(reader11_OnInterrupt);

}

void pin11_OnInterrupt(uint data1, uint data2, DateTime time)
{
            if (data2 == 0)
            {
                count1++;
                dataX = dataX << 1;
            }
            pin11_Initialize();
}


but the interrupt is not executed. I’m doing wrong that is not running the interruption?

lerg98

Are you sure you have PD9 connected?

Hi Gus, actually was taking the opposite pin in the cable.

Sorry my mistake, I had revised according to the scheme, but was taking the opposite pin.

lerg98