Oops, forgot the tag :( Hi all, Can I just check- is there a known problem with the source code given on page 43 of the 16F877 datasheet? I ask because I cannot get it to work, either using the simulator or using an uC. The problem lies around the SLEEP command. When I run through the code, the SLEEP command steps okay but the next command hangs regardless of what it is. In desperation I looked at the EPE datalogger source code and note that although they have used the exact code as stated in the datasheet they have replaced the "SLEEP" command with a manual check for the EEIF flag. Is this a known gottcha? Thanks Ben -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads