Mike Keitz wrote: > By using the right sequence of instructions, you can make the CPU run > a write cycle to the EEPROM with an address and data supplied by the > PIC. In effect you use the CPU as an address latch, avoiding the need > to add one to support the programming mode. I used a hardware variant of this for the first computer I ever built, from scratch. The CPU was reset, then single stepped. At each step, it put the address onto the memory which was then read and/ or written as required. The single step logic then jammed a "NOP" onto the data bus and executed a program step to access the next location. This suits a CPU which starts reading at $0000. Apart from reset, the "jam" logic has nothing whatever to do with the address bus, so you need only enough I/O for data bus and control lines. A 16F84 could do this just fine. > To program another byte, the PIC resets the CPU and does the same > thing again. The exact implementation depends on exactly what CPU and > other hardware is involved, but hopefully this has planted the seed of > an idea. The trick is to do it *without* resetting the CPU but simply stepping through until you get to the area you want to modify before executing the EEPROM modify instructions. Interestingly enough, extremely similar in concept to serial programming of a PIC. -- Cheers, Paul B.