I am trying to make PIC1 be a master and PIC2 be a slave through SPI communication. I want to send a command from PIC1 (master) to PIC2 (slave), then have it do something. However I want to establish another SPI communication from PIC2 (slave) to a digital potentiometer (MCP4241) through SPI communication as well. Will this work ?
To illustrate :
PIC1 sends 'a' ---- > PIC2 reads it
PIC2 ---- > establishes connection with digital pot(MCP4241)
PIC2 ---- > sends data to digital pot
So there will be SPI communications between PIC1 and PIC2, then PIC2 and digital pot, I just don't know if this is going to work since I would need to use the same pins. For the two PICs, I am using pic16f690.
I hope my question is clear and please if this won't work how should I fix it?
Thanks!