Hello,
I have a very simple program that reads a several motor encoders (about 12000 ints per second). One ISR per interrupt pin.
The issue is that it works fine on pins 2..13, but pins 23 onwards don't catch the input from the encoders.
Each ISR only increments a counter... ISR_A increments counterA, and so on.
Tried just changing encoder0pinX initialization, say from 23 to 5, and works fine, but as said, on pins 23 onwards, no input.
const byte encoder0pinB = 23;
const byte encoder0pinC = 24;
const byte encoder0pinD = 25;
void wheelSpeed_FR()
{
durationFR++;
}
void wheelSpeed_RL()
{
durationRL++;
}
void wheelSpeed_RR()
{
durationRR++;
}
setup()
{
...
attachInterrupt(encoder0pinB, wheelSpeed_FR, CHANGE);
attachInterrupt(encoder0pinC, wheelSpeed_RL, CHANGE);
attachInterrupt(encoder0pinD, wheelSpeed_RR, CHANGE);
}
Any clues?... I've spent hours looking at this, but can't figure out what's going on... I'm using 1.5.7 for mac. Checked winterrupts.h, and seems good... portD handlers included.
I'm setting pin modes as INPUT. Also tried INPUT_PULLUP, but didn't make a difference.
Appreciate your responses.
i