> A colleague is having trouble with code that runs fine on the 18C but > not on the 18F. Well, we found the problem. It wasn't a gotcha, it was a duh. The project was set up to be able to quickly change from the 18C to the 18F part - pretty typical. One of the items unique to the 18F compile is an initialization of the built-in data eeprom. That code had been lifted from an earlier 16F876 project. The logical address for eeprom data on the F876 is 0x2100, which just happens to fall smack in the middle of the 18F452's program space. So whenever the project was switched over to the flash part, it was being commanded to over-write part of it's program. Just another case of computers doing exactly what they are told to do. If anyone is interested, the logical address for eeprom data for the 18F452 is 0xF00000 (five zeroes), and it seems to write in words instead of bytes. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.