Andreas Nyholm wrote: >Since both you and Bob was so sure it was a software bug I took a look >at my bootloader and did actually found out while moving 0x21 to EEADRH >and 0xFF to EEADR I was in bank3 not bank2! But now I'm even more >confused ;) How is it possible that the bootloader worked 100% of the >times in my prototype and 7(9) of 10 times in the ones I tried yesterday >with wrong bank settings??!!? >(power have been off between and this is the first move to EEADR and >EEADRH after power up so it can't just have been there since last time) >Guess I must have been very (un)lucky! > If you were writing to EEADR in the wrong bank, chances are good you were reading EEDATA from the wrong bank. The data sheet tells you what values should be in any particular register on boot up, but I'll bet it's 'Undefined', and you may sometimes get FF, and other times get something else. Good luck! -Adam -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.