??? 02/26/09 03:50 Read: times |
#162854 - This is my solution, and almost there Responding to: ???'s previous message |
Kai,
With your help and Jerson Fernandes, these two solutions together have solved my issue at hand. I'm getting some reading jitter in the output, I can put a hysteresis threshold in there, but I think the solution that was given to me in the past that deals with rounding will be useful here and also hystersis window to update the display to help stabilize the data. Here is a snippet of the code that is working. THanks again, really, to all, this is like a huge weight off my shoulders. if (SPEED_IN == 1){ timers_stoptimer0(); Speed_Data_Calculated[0] = (2750 / (Speed_Tick_Count[0] * 2 )); //Speed_Data_Calculated[0] = (5000 / (Speed_Tick_Count[0] * 2.2 )); Speed_Tick_Count[0] = 0; timers_starttimer0(); // Start 5Khz reference Speed Pulse SpeedDisplayUpdated[0] = 0; } |