
So assuming you don't use the #define PPM_ON_THROTTLE option then it would appear that what you get is:
Code: Select all
#define PPM_PIN_INTERRUPT attachInterrupt(4, rxInt, RISING); //PIN 19, also used for Spektrum satellite option
The comment seems to imply that it is setting up interrupt handler 4 to grab the PPM-SUM data using pin 19 ... so what is it that tells me that this is Pin 19 ... I can't seem to find it in the code or is it something that is implied by the interrupt handler 4 ?
Looking at the mega2560 pin mapping I can see that :
45 PD2 ( RXDI/INT2 ) Digital pin 19 (RX1)
or
19 PB0 ( SS/PCINT0 ) Digital pin 53 (SS)
or
86 PK3 ( ADC11/PCINT19 ) Analog pin 11
So which pin 19 does it mean ? (this is a tad loaded coz I believe it is the PD2 pin but I just don't understand how that is defined in the code.
If you do use #define PPM_ON_THROTTLE you get
Code: Select all
#define PPM_PIN_INTERRUPT DDRK &= ~(1<<0); PORTK |= (1<<0); PCICR |= (1<<2); PCMSK2 |= (1<<0);
Again how does this translate into this pin :
89 PK0 ( ADC8/PCINT16 ) Analog pin 8
And then onto the crux of my question ... How can I change this to us this pin :
36 PL1 ( ICP5 ) Digital pin 48