Pages: [1]   Go Down
Author Topic: Handling multiple time critical interrupts  (Read 692 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,
I am currently working on a project connecting my RC transmitter with a simulator cable using an Arduino Uno and a RC receiver.

Transmitter ~~~ wireless ~~~> Receiver -- PWM --> Arduino --- PPM ---> simulator cable

As of now, I am able to read the PWM signals of the receiver using pin change interrupts on the analog pins. The last task would be to generate the required PPM signal for the simulator. I was thinking about timer interrupts to ensure, the PPM frames start at the desired time and use the remaining time of the frame for other processing tasks like reading the PWM signal. Since there is no way to run both ISR at the same, how can i guarantee, that both signals are processed error-free regarding their timings?
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 50
Posts: 1767
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Dealing with interrupts is outside of my current experience level, but I'm just wondering out loud whether you might be better served using a DAC (digital-to-analog converter) and read in the value via a normal analog pin, or attach the receiver to the Arduino via SPI.  It seems rather error prone to have your receiver convert a binary number into a series of PWM pulses and then have to convert those pulses back into an analog value by counting the pulses in the Arduino.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, its a regular 8 channel RC receiver I want to use with my RC transmitter. It just serves 8 PWM signals.
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 25
Posts: 1875
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I think that all you need to do is read the input and write it to the output.

So loop() would just be

digialWrite(outputPin,digitalRead(inputPin));

Mark
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 25
Posts: 1875
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I should have said that if you cut in between the RF RX stage and the decoder you have only one input. not many to deal with

Mark
Logged

Pages: [1]   Go Up
Jump to: