On Mon, Feb 14, 2011 at 11:51 AM, Andre Abelian w= rote: > David, > > sorry I am not familiar with your method at all. I know what LUT is but > I do not know how you did it? can you give brief explanation? > thanks Basically it just means taking some part of the computation that you find to be difficult or time consuming, and creating a lookup table for the range of input variables, with the output precomputed. Index the base of the table, add the variable to the base, and read the result. For a thermal printer, I had eight LUTs for different parameters in a 13 term equation that had to be computed during a 300uS interval, while dealing with other events on interrupts. In your case, I'm thinking you may not need to know the exact RPM number, just whether it's in some defined range. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .