Hi all,
This is my first venture into using Pin Change Interrupts and the board i will be using is the Mega 2560. I want to setup two PCINT'S on to different ports namely PCINT10 and PCINT16 which correspond to Digital pin 14 and Analog pin 8 respectively. Having had a look at the data sheet it is my understanding that PCINT10 is covered by PCICR1 and PCINT16 is covered by PCICR2 and similarly PCMSK1 and PCMSK2. My question is is the code below the correct way to initialize them in Setup().
cli();
PCICR |= 1 << PCIE1;
PCMSK1 |= 1 << PCINT10;
PCICR |= 1 << PCIE2;
PCMSK2 |= 1 << PCINT16;
sei();