Dear Sean, I received its solution proposal for my problem, only that I didn't understand very well, as to use a routine of floating point. It is probable that due to my lack of experience in division with floating point is hindering my understanding. I please request its help in this point, if it is possible.. Respectfully, Joco Batista Sean Breheny wrote: > Now, of course, this would require floating point division and floating > point comparison, and there are ways to make this better for the PIC: > > 1) Don't put floating point values of Vb into the table. Instead, store the > actual code that you will get from the ADC. > > 2) Instead of picking the values of the table to be evenly spaced as far as > PSI goes, pick them to be evenly spaced as far as Vb goes, and pick them so > that the number which you get from the ADC has zeros in as many of its > lower bits as possible (so if the interval between table ADC values is, > say, 4, and you start at a multiple of four, then the lowest two bits of > each table ADC value will be zero) This allows you to eliminate the > floating point compare from the table lookup process. You can just see if > the upper 6 bits of the value you read from the ADC are the same as the > upper 6 bits of a value in the table, and select that one. > > I know that this is not very clear. Please feel free to email me privately > and I will explain it further. > Sean >