Go Down

Topic: Reading 3 PWM signals on ATTINY84? (from RC RX) (Read 811 times) previous topic - next topic

MatCat

I am wanting to read 3 channels from an RC TX, note that output is PWM NOT PPM.  I have seen examples of using pin change interrupts on arduino to look for when it goes high, have timer count until it goes low and get pulse width, but how do I do this on ATTINY84?  I have pin's 8 through 10 connected to the PWM inputs from the RX and I need to read all 3 of them.  The module itself will take the values and appropriately generate a PWM signal on pins 5 to 7 to control 3 sets of high power LEDs.

Basically I am not sure how to 1, enable the interrupt properly, 2, accurately measure the time (use timer, or in main loop?), 3, will setting a timer on timer1 effect PWM generation, and if so how can I tackle that?

Thanks ahead for the guidance!

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy