Luis, Just note that *if* you are using the 18 series PICs the compare can be done in simpler ways then the examples that have been posted here. (I'm not saying that they are wrong ! Not all all.) So again, what PIC series are you using ? Jan-Erik. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads