Incremental rotary encoder issue on the GIGA R1

Hi, I have an incremental rotary encoder (E38S6G5-600B-G24N), its a 2 channel rotary encoder 5 cables ,

  • Red - 5-24V
  • Black - GND
  • White - Channel A
  • GREEN - Channel B
  • Shielding - GND

My issue is that the rotary encoder doesn't call the interrupt on the Arduino GIGA R1, to be sure that the rotary encoder is not the issue itself I created this small test program and run it on both Arduino DUE and Arduino GIGA R1 (Both 3.3V devices) and I used the same connections Red on the 5V pin black on GND and channel A at pin 52. On the DUE there was no issue, but on the giga I cant get any results.

volatile int encoderCount = 0;
volatile int prevCount = 0;

void encoderISR()
{
  encoderCount++;
}

void setup() {
 Serial.begin(9600);
 pinMode(52,INPUT_PULLUP);
 attachInterrupt(digitalPinToInterrupt(52),encoderISR,CHANGE);
}

void loop() {
 if(encoderCount!=prevCount){
    Serial.println(encoderCount);
    prevCount=encoderCount;
 }
}

Are the internal pullup resistor that much different on the GIGA and the DUE (could that be an issue?), are there any quick fix I could use, what could I do to make it work? Thanks.

For anyone wondering, or facing the issue.

As it was discussed here FYI: interfacing E38S6G5-600B-G24N 600P/R rotary encoder this sensor requires at least 5V (max -2%) I had 4.83V on the areduino giga 5V output, and 4.98V on the DUE. But this wasnt the only issue, for some reason the encoder doesnt work with the built in INPUT_PULLUP inputs, a had to make an external pullup resistor to the chanels to make it work.

Read more here Rotary encoder issue on Arduino GIGA R1 : arduino (reddit.com)

Hi, I came back this part and saw your posts. Two years old me was half lucky half wrong.

It needs 7V. "5-24V" is total BS. There's 5V regulator inside which needs about 1.7V of difference to work. That's why it sometimes work at slightly above 5V by error and sometimes not.