Have you considered using the Interrupt On Change (IOC) feature? This way the little guy gets to sleep longer than 33ms before having to look for a status change.
Set it up to "wake" on a change of state and go from there. (I know I make it sound so easy) A quick glance at the data sheet shows that Ports A and B have pins available with this feature.





Bookmarks