Go Down

Topic: ppm (sum) in to servo output, possible timer issue (Read 3 times) previous topic - next topic

DuaneB

Hi,

change this in the cpp file

Code: [Select]

void CRCArduinoPPMChannels::begin()
{
m_sOutOfSynchErrorCounter = 0;
attachInterrupt(0,CRCArduinoPPMChannels::INT0ISR,RISING);
}


to this

Code: [Select]

void CRCArduinoPPMChannels::begin()
{
m_sOutOfSynchErrorCounter = 0;
/* We dont need this if using the sample sketch
attachInterrupt(0,CRCArduinoPPMChannels::INT0ISR,RISING);
*/
}


That should do it.

I will dig out the PPM Output for you as well, probably tomorrow, remind me if I don't

Duane B

DuaneB

Sorry, needs another line to enable interrupts, will advise in a few minutes.

Duane B

DuaneB

Add this to the setup function in the main sketch, I will update the original link with these two changes  -

Code: [Select]
 
// enable the external interrupt
EIMSK = 1;  //1 - enable external interrupt 1
EICRA = 3; //3 - enable interrupt on rising edge only


Any problems let me know

Duane B

cardboardboks

Ok have done the above mods and I still run into the vector 1 error.
Just to make sure - I am talking about using the sketch found at the bottom of this page
http://rcarduino.blogspot.co.nz/2012/11/how-to-read-rc-receiver-ppm-stream.html

DuaneB

In work at the moment, so can't help but try this -

Use the original cpp and h files without modification, but remove this from the test sketch -

Code: [Select]

ISR(INT0_vect) {
CRCArduinoPPMChannels::INT0ISR();
}

Go Up