I'm currently using two 8 bit parallel in serial out shift registers to read and decode digits on 7 segment displays. It has me thinking, how would I use this method for serial data inputs? Like having a serial signal on each parallel input of the shift register. It would be like demultiplexing, but instead of reading one input stream at a time and switching between them and returning a byte for each of the inputs, the register would have one bit in each byte for each bit of the input streams.
The advantage to this over demultiplexing would be that it required only 3 pins, clock, load, and data, no matter how many inputs there are. The demultiplexer would require n pins for 2^n inputs.
The inputs would need a clock signal, assuming they all share a common clock, that signal could go into the load pin. That clock would then be multiplied by the number of parallel inputs and go into the clock input of the register and also to the arduino. Then only two pins would be needed on the arduino, clock and data. Possibly only the data pin if the clock rate is known, but I'm not sure if this is feasible.
The data retrieved could be put into a matrix and turned 90 degrees to produce the original inputs.
The sequence diagram might not be totally accurate but I think it helps get the idea across.
The only limit to the inputs I see is the clock speed, seeing as it scales linearly with the number of inputs. For an n-bit register, the output clock needs to be n times faster than the input clock. That might be a job for a PLL or something, but at what point is it better to just use another arduino instead of all this?
Is it feasible to design a general purpose input expander like this? I assume a similar method using posi registers could be used to expand the outputs.