Slave PIC to be used like CD4021 chip
This is a little weird but, has anyone used a PIC as a slave device like the 4021 PISO (Parallel Input Serial Output)?
I am trying to use some 4021 as Digital inputs and also get some analog values (8) and all read by the master controller through a Shiftin command.
The idea is to use a 65 bit buffer, 64 bits for the 8x8bit analog values, and 1 bit for the input of the device, so other can connect on the bus, like another 4021 or another 8 analog input device.
My main problem is how to shift the 65 bit array (preferably not in assembly...).
Thanks,
Ioannis