I'm building a device with two PICs, a PIC18F46K22 and a PIC16F88. I have a buffer on the 18F46K22 which contains a program that I want to write to the program memory of the 16F88. I can't do this manually, because it has to happen on the fly (the buffer might change), so the programming has to be initiated by the 18F46K22. The CONFIG bits can be set manually though, I don't need to change them on the fly. There is also no need to write to the 16F88's RAM or EEPROM by the 18F46K22.
The two chips are powered with 5V and there is no 12V supply available. I guess I'll have to go with Low Voltage Programming (LVP)?
Is there anyone who has done such a thing already? Is there some code or a circuit available somewhere to program a PIC with a PIC?
In the end, this is to make a basic PIC-based coding device: the user edits the buffer on the 18F46K22, programs the 16F88 with it. There will be an I2C interface between the two so that there can be some sharing of results. The programming to the 16F88 will be for mathematical purposes only: the chip gets some input over I2C and a START trigger on some pin. After that, the result is sent back over I2C.