threewheeler6 wrote: > My program works like expected on the 684a but when ported to > the 690 it is full of bugs. That means it's full of bugs either way, but that everything was just right before so that the symptoms didn't manifest themselves. I just tried to look up a 16F684A and couldn't find it. Provide a link to the datasheet. > It will not read the mode jumper to got into program > mode reliably, That's obviously a good place to start chasing down why it's not working. What have you found so far? > movlw key > movwf temp1 > movlw eekey > movwf temp2 > movlw 0x00 > call EE_Read_Byte ;restore number of bytes in key > movwf keycount > movwf bit_count > EE_Restore_1 > movfw temp1 > movwf FSR > movfw temp2 > call EE_Read_Byte > ... First, this wouldn't have assembled with MPASM since opcodes must start in column 2 or later. If you're using a nonstandard assembler, you should point that out. Second, this code exhibits disregard for banking, including both the direct and indirect banks. Perhaps there are special circumstances that allow banking to be ignored here, but then there should be comments explaining th= e unusual circumstances. Third, there are hardly any comments. This code was a disaster waiting to happen, and now it did. The best way t= o deal with it is to ditch the code, fire whoever wrote it, then get someone competent to replace it from the specs only. Allowing this code to live on even in some small way will only cause more trouble. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .