This is a long shot but I learned this the hard way and sometimes something that is obvious, isn't, as we have all seen.So just in case this is something you have assumed,I'll throw it out there :are you using an EPIC to program?and did you use 'HS' for the clock configuration in Epic.I once did a define with the osc 20 DEFINE but used :the 'XT' for the clock .The device worked but did some freaky things.-Keith