This could work, but you'll need to do it all the time in a loop, hence why the comparator or maybe interrupt on change idea came from... and you will need to use Bitwise AND
PORTx=PORTx & PORTx
I haven't investigate the CCP idea, but sure there's something valuable in it. Have a look at Microchip CCP Tricks n Tips document.
http://ww1.microchip.com/downloads/e...Doc/41214a.pdf
Bookmarks