Martin Kirk wrote: >Hi, > >Will someone please give me a brief list of the requirements for clearing >the registers when moving one's code to non-windowed pics? I assume it >is a simple clear all registers operation. Please confirm. > AFAIK, the non-window PICs have *exactly* the same chip in them as the window ones. So there should be no difference in operation between one type and the other, other than inability to erase the non-window one. (In an earlier thread, someone noted that newer versions of the window chips have a non-erasable code protect bit. So if this bit is set, a windowed chip would be non-reusable as well. Has Microchip issued an exact statement on this?) If you're counting on light through the window setting the RAM (registers?) in a certain condition, this is very bad practice, not certain to work in any case. It is important to design your code so it doesn't assume anything about the state of the RAM on power-up. The special function registers are reset as described in the table in the data book, but the RAM is not guaranteed to be reset to any particular state, window chip or not. There is no single "clear all registers" instruction. However the FAQ contains a good example of a loop which will do it. Depending on the number of locations that must be cleared for your code, it may be simpler to just use a few clrf's on the vital locations. -Mike