If you use a table for this, get a spreadsheet and list all possible periods you can measure and the corresponding RPM. I guess you'll do this for 256 values for now. Now look at adjacent RPM values in the table and you'll see that at one end of the table, there is a larger jump from one RPM value to the next. Can you live with that resolution? If not, then you'll need to use a larger table, and that takes a bit more work, and a lot more space. Personally, I would (and have already) done the math. Yes it does take a bit of work, but it's not really complex. 8valves wrote: > > Howzit guys > > I'm currently building an RPM measuring device but I have a decision that > I may need professional assistance with. I will be measuring the period of > a single rotation and will thereafter convert this value to a RPM > equivalent. Implementing the tedious conversion formula on assembly > language will prove to be a challenging and time consuming task. Instead > what I'd like to do is use the period value as an index into a look up > table that will hold the corresponding RPM values. The problem is that the > period is exponentially related to the RPM. How do I go about conditioning > the period value as the index into the table? Would you guys suggest that > I instead implement the formula? If so, does anybody have asm routines to > handle these big numbers? > > Thanks guys > -- View this message in context: http://www.nabble.com/RPM-Look-Up-Table-tp24804199p24909790.html Sent from the PIC - [PIC] mailing list archive at Nabble.com. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist