that's different, so you don't need any timer stuff. Just poll the pin or use Interrupt on X pin on rising or falling edge.
The following is another one wich can be handy.
http://www.picbasic.co.uk/forum/show...63&postcount=5
OR on Melabs website wich also include the schematic. Dimmer.Zip
http://www.melabs.com/resources/samples.htm#submitted
*** EDIT ***
Yeah on the previous i lace 10K to ground to avoid weird reading when the input is left open. That way it ensure the PIC see 0V so never count and display XYZ results.
Last edited by mister_e; - 24th September 2005 at 01:52.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks