From: Justin R. <ju...@ra...> - 2008-03-13 04:54:33
|
I changed #define Clear_ICF1 TIFR|=(1<<5) #define ICF1_Empty (TIFR&(1<<5)) and Clear_ICF1; while (ICF1_Empty);//wait for capture pulse_start=ICR1; Clear_ICF1; Capture_Fall; while (ICF1_Empty);//wait for capture pulse_end=ICR1; Clear_ICF1; It does the same thing. Before if I use (TIFR&(1<<5)) it would get stuck at the while loop, but now it just jumps through it and returns 0 (or close to 0 I am using the delay to tell). Thanks, Justin -- View this message in context: http://www.nabble.com/Robostix-timer1-capture-and-servos-tp15942835p16021267.html Sent from the Gumstix mailing list archive at Nabble.com. |