Main Menu
Home
AVR News
Atmel AVR
AVR Development Tools
Valuable Tools
WinAVR toolset
Makefile for WinAVR
AVR Virtual Simulators
Hardware for prototyping
GCC and AVR-GCC
Short introduction to C
AVR-GCC Tutorial
Example AVR Projects
AVR-GCC articles
WinAVR Site Map
Scienceprog FORUM
ScienceProg BLOG
Disclaimer
WinARM Tutorial
Latest comments
Measuring motor speed and...
Dear Administrator The code above...
More...

Programming AVR ADC module...
hi please send me example usart with...
More...

Measuring motor speed and...
main.c: In function...
More...

Running TX433 and RX433 RF...
(Hopefully this is not a re-post). I am...
More...

Running TX433 and RX433 RF...
I just bnought a pair of the RX/TX 433...
More...

Friendly sites

Related Items:

Recommended sites

Tampa, FL LTC Insurance - Local Agents Compete
Stock Quotes
Latest News
Report a comment

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.

Name
 
E-mail
 
Reason for reporting comment
 
 
 

Comment in question

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...

»  Go back to the article


mXcomment 1.0.6 © 2007-2008 - visualclinic.fr
License Creative Commons - Some rights reserved

© 2008 WinAVR AVR-GCC Tutorial
Joomla! is Free Software released under the GNU/GPL License.