Thanks for your answers...
Actually I dont think it is so difficult to do the software on the programming PIC. This is easy to me but I need to know what the program needs to do.
Just for reference, I've done some very complex programs including realtime processing of packets of bytes coming in and out of a PIC in manchester protocol, using bit bang techiniques. The program takes the timing from the input pin to generate the ouput bits simulatenously as data comes. I've also done another simpler one that converts serial data from the computer to manchester data and vice-versa. Although, I'm not very good with hardware and electronics since I don't work with electronics...
Electronics and PIC's are just a hobby for me, but I'm very very dedicated and I'll do that project, since I need it for a friend. In some aspects I'm more than a newbie, on other ones I'm very advanced PIC programmer.
So please, correct me when I say something stupid, I just like to think about the projects so I can learn...
Ok, coming back on my doubts:
I would suggest using completely seperate lines for both source and target PIC's, it's probably possible to do it with common clock and data, but you would need to repeatedly switch them between the source and target.
So you need Vdd, Vpp, Clock, Data for each PIC, that's 8 I/O lines.
Ok, but I thought VDD and VPP could be shared and constantly on while I turn on the circuit board. This simplifies the things, because once the PICs are there, I just turn on the standalone programmer and then it will already put both source and target PIC on programming mode. Is that possible or ********?
Regarding the clock data, I don't know how I could set an I/O pin to generate clock data other that setting it high and low at a constant frequency. So, I thought the RB6/clock pin was already responsible for generating clock cycles so the PICs can be in sync. So, after reading your response I suppose they are only for input of the clock pulses while in the programming mode, and that I will need to generate the clock pulses for the synchrounous communication other way, right?
What I wanted to do is to somehow take the clock pulses from the crystal used as the XT oscillator for the programming PIC to generate the clock pulses needed on the RB6/clock pin of the source/target for the synchrounous communication. The objective is to not have use cycles from the programming PIC to generate clock pulses for the source and the target. The clock pulses would then be constant all the time.
Then, if the above is possible, I would need only 2 i/o pins on the programming pic that would be used for output of the commands for the source/target PIC's and also for sending and receiving data from one to the other.
So the sequence would be like this:
Turn off the circuit with a switch.
Put both the source and the target PICs at their respectives sockets.
Turn on the circuit.
VPP is applied to both the source and the target PIC's.
Then VDD is applied both programming, source and target PIC's.
At this time, the clock pulses on RB6/clock pin of both the source and the target PIC's will be constant.
Then the programming PIC starts its routines which consists:
Set the 1st i/o pin to output and send the "read data" command for the source PIC;
Set the 1st i/o pin as input, loading data from the source;
Set the 2nd i/o pin as output and send the "load data" command for the target PIC with the data that was copied from the source to the target PIC through the 2nd i/o pin;
Increase the PC so the next address is read on the source PIC until it achieves the end.
Repeat until the end. The same for EEPROM memory.
Please I don't know if I'm wrong about the above concepts... Let me know your opinion...
My understanding is that the clock pulses for the programming mode on the RB6 pin for both the source and target PICs can be constant, even with not data is being writen/read. Also, I believe once the VPP is applied to source and target they are still in programming mode.
Please correct me/comment anything if I'm wrong...
Thanks...