Reading rx input using interrupts

Hi,

I am building a quadcopter and am going to be receiving input from the Turnigy 9x 8ch reviver. I've been using the pulseIn() function that is hanging up my program quite substantially. I would like to try out interrupts and see what happens. Could someone explain how they can be used when the Arduino Uno only has to external interrupt ports? I believe the author of blueCopter: https://github.com/baselsw/BlueCopter/blob/master/BlueCopter/RX.ino used 2 ports and received input for 4 channels some how...

Any input would be appreciated!

If you are asking if you can have more than 2 interrupts on an UNO, you can if you wire OR them.
When the interrupt comes in your code checks to see which input actually caused the interrupt.

The arduino only has two pins that directly cause an interrupt that has its own vector. However there is a pin change interrupt mode where an interrupt is generatespd when ever any number of pins change. Then the interrupt service routine figures out what pin it was and vectors to the right location in the code.
See the processor's data sheet for detailes.

LarryD:
If you are asking if you can have more than 2 interrupts on an UNO, you can if you wire OR them.
When the interrupt comes in your code checks to see which input actually caused the interrupt.

Would you mind explaining how this is done? Or providing some information where I can learn for myself?

Inputs 1-4 go to their usual inputs on the Arduino.
Whenever they go HIGH that HIGH is seen on D2 of the Arduino causing an interrupt.
The ISR looks at D8-D11 to see who is HIGH.

LarryD:
Inputs 1-4 go to their usual inputs on the Arduino.
Whenever they go HIGH that HIGH is seen on D2 of the Arduino causing an interrupt.
The ISR looks at D8-D11 to see who is HIGH.

Ok thank you! So do I read D2 and see how long the interrupt is for? how would I tell which signal is HIGH? Is there some example code somewhere I can look at?

I suggest you look here for a great review:

D2 is interrupt 0 which would be set to a rising edge.

All you have to do is read input D8, 9, 10, 11 if they are High then they caused the interrupt. Note make sure you check them all as two interrupts or more could come in at the same time.

LarryD:
I suggest you look here for a great review:
Gammon Forum : Electronics : Microprocessors : Interrupts

D2 is interrupt 0 which would be set to a rising edge.

All you have to do is read input D8, 9, 10, 11 if they are High then they caused the interrupt. Note make sure you check them all as two interrupts or more could come in at the same time.

Oh my god thank you!! That link is incredibly useful and exactly what I am looking for!!!

The problem with that wired OR arrangement is that once one of the four inputs go high then this will prevent any of the other three from generating an interrupt. So you could have one encoder stooped effectively jamming the other three.