For the interrupt routine, like I said, just take a look at the code I posted in the laptimer discussion. Adding ASM to PBP is very easy.
If you are worried about the LCD routines, than I would simply use a serial LCD.
If you go here, http://www.hvwtech.com/pages/product...=5&SubCatID=18 and take a look at the serial interface LCD kit.
I use this in a few projects to save on pins and it works very well.
You can also use a LED display with a MAX7219. Takes only 3 pins and is only a simple a quick serial out.
The nice part about the interrupt is that you will not miss any pulses. And you can even have it so that the time it takes to complete a cycle is not fixed. So if for some reason it does take a bit longer to complete a cycle you just change the math a bit.
By the way, I'm not saying Melanie's approach is not the way to go. There are simply many ways to skin a cat.
Do you have any numbers of how many revolutions you can expect in a minute. Lowest? Highest?
Bookmarks