Pinchange Interrupts and reading PWM signals.

Here’s an article by mwwalk on Pinchange interrupts, its quite helpful. and here’s the code for reading 4 PWM signals from a RC Transmitter Reciever on Atmega328- //Digital Pins 2,3,4,5 for 4 Channels #include<avr/interrupt.h> volatile unsigned int preval[4]={0},temp=0,pwm[4]={0}; //preval stores micros() at the time when signal is going high, 4 channels 4 preval. boolean jack[4]={true}; //boolean … Continue reading Pinchange Interrupts and reading PWM signals.