Simon Nield wrote: >nice one morgan! so cunning you could stick a tail on it and call it a fox. :) >what do you think of the small changes below to remove sensitivity to the polarity of RA4 ? Elegant solution! >this code it _not_tested_ by the way, so beware. I will test it tonight or tomorrow and will post the upgraded code if it works. Thanks /Morgan -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.