Thanks guys, I managed to fix the problem with PISO. The problem was the IC itself, it was faulty, I replaced it with a new one and it worked perfectly fine.
A new problem arises.....
The PISO goes into a SIPO with storage (SN74HC594). I can manage to send the serial bits to the sipo and parallel output them with the correct sequence. However, I cannot stop the storage clk in time to display a number.
For example, the piso is clk at high frequency which will also be used for the sipo. After the 4-bit serial data is shifted in the sipo, I want to extract that particular data. So, If i send 0101 (no.5) i want it to appear at the sipo output.
Any suggestions