In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: If you have one sensor on the shaft, then at 500 RPMs your period will be 12000 in PULSIN counts. You cannot take 12000 times 1000 because that will overflow the word variable maximum value of 65535. Even at 7000 RPMs the period will be 857 in PULSIN counts. And again you cannot take 857 times 1000. You will need to do a 32 bit division to get RPMs. I have some code to do 32 bit division, I'll have to see if I can find it. Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=199012#m199150 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)