Quote Originally Posted by RossWaddell View Post
... Could it be that with additional code lines somehow the chip isn't being completely erased before re-programming so the EEPROM variable is some number > 255?

What if you display the eeprom value to an LCD or send it out to PC via RS232?

It would help to eliminate that as the source of your problem.