Not so complicated if we read the datasheet. :grin:
The LS95B is a 4-Bit Shift Register with serial and parallel synchronous operating modes. It has a Serial (DS) and four Parallel (P0–P3) Data inputs and four Parallel Data outputs (Q0–Q3).
The serial or parallel mode of operation is controlled by a Mode Control input (S) and two Clock Inputs (CP1) andb(CP2).
The serial (right-shift) or parallel data transfers occur synchronous with the HIGH to LOW transition of the selected clock input.
1. When the Mode Control input (S) is HIGH, CP2 is enabled.
A HIGH to LOW transition on enabled CP2 transfers parallel data from the P0–P3 inputs to the Q0–Q3 outputs.
2. When the Mode Control input (S) is LOW, CP1 is enabled.
A HIGH to LOW transition on enabled CP1 transfers the data from Serial input (DS) to Q0 and shifts the data in Q0 to Q1, Q1 to Q2, and Q2 to Q3 respectively (right-shift). A left-shift is accomplished by externally connecting Q3 to P2, Q2 to P1, and Q1 to P0, and operating the LS95B in the parallel mode (S = HIGH).
For normal operation, S should only change states when both Clock inputs are LOW.
However, changing S from LOW to HIGH while CP2 is HIGH, or changing S from HIGH to LOW while CP1 is HIGH and CP2 is LOW will not cause any changes on the register outputs.
SISO, SIPO, PIPO more simple to execute.
SIPO:
S(MODE) =0
CP1(CLK1)= active use a HIGH to LOW transition
DS(SER) = receive data
Qa, Qb, Qc, Qd = data output
A, B, C, D = not in use (don't care)
CP2(CLK2) = not in use (don't care)
SISO:
S(MODE) =0
CP1(CLK1)= active use a HIGH to LOW transition
DS(SER) = receive data
Qd = data output
A, B, C, D = not in use (don't care)
CP2(CLK2) = not in use (don't care)
PIPO:
S(MODE) =1
CP2(CLK2)= active use a HIGH to LOW transition
DS(SER) = not in use
Qa, Qb, Qc, Qd = data output
A, B, C, D = receive data
CP1(CLK1) = not in use (don't care)
PISO need more operations to do:
1. First - load parallel data
S(MODE) =1
CP2(CLK2)= active use a HIGH to LOW transition
A, B, C, D = receive data
CP1(CLK1) = 0 (don't care)
DS(SER) = not in use (don't care)
2. Second - change mode
CP1(CLK1) = 0
CP2(CLK2) = 0
S(MODE) = 0
3. Third - transfer serial data
S(MODE) = 0
CP1(CLK1) = active use a HIGH to LOW transition
Qd = data output
CP2(CLK2) = not in use (don't care)
A, B, C, D = not in use (don't care)
DS(SER) = not in use (don't care)