Go Down

Topic: How to code internal interrupt on arduino due (Read 1 time) previous topic - next topic

jone31

Hi there, i want to translate this code on arduino uno to the arduino due.
please help

Code: [Select]

 //Arduino (Atmega) pins default to inputs, so they don't need to be explicitly declared as inputs
  PCICR |= (1 << PCIE0);    // set PCIE0 to enable PCMSK0 scan
  PCMSK0 |= (1 << PCINT0);  // set PCINT0 (digital input 8) to trigger an interrupt on state change
  PCMSK0 |= (1 << PCINT1);  // set PCINT1 (digital input 9)to trigger an interrupt on state change
  PCMSK0 |= (1 << PCINT2);  // set PCINT2 (digital input 10)to trigger an interrupt on state change
  PCMSK0 |= (1 << PCINT3);  // set PCINT3 (digital input 11)to trigger an interrupt on state change

Rufe0


Jwallace

Dear jone31,

Did you ever figure out how to translate the code onto the ardunio due?

Cheers,

Josh

Go Up