Thank you for taking the time to report the following comment to the administrator of this site.
Please complete this short form and click the submit button to process your report.
The code above are worng. You need include the folowwing line and modifications
1) #include 2) %06u replace for %06lu
The folowing code are incomplet or wrong =============================
ISR(TIMER1_CAPT_vect) { if(calculate==0) { TCNT1=0; calculate=1; } else if (calculate==1) { //Saving current timer value on falling edge CurrentTime=ICR1; calculate=2; } else if(calculate==2) { CurrentTime=ICR1; T=(uint32_t)CurrentTime; //form string with RPM value sprintf(buffer,"RPM: %06lu",RPM/
This code is wrong
By: JCAK on 03-08-2008 01:52
Dear Administrator
The code above are worng. You need include the folowwing line and modifications
1) #include
2) %06u replace for %06lu
The folowing code are incomplet or wrong
=============================
ISR(TIMER1_CAPT_vect)
{
if(calculate==0)
{
TCNT1=0;
calculate=1;
}
else if (calculate==1)
{
//Saving current timer value on falling edge
CurrentTime=ICR1;
calculate=2;
}
else if(calculate==2)
{
CurrentTime=ICR1;
T=(uint32_t)CurrentTime;
//form string with RPM value
sprintf(buffer,"RPM: %06lu",RPM/
» Report this comment to administrator
» Reply to this comment...