Just decided to share a bit of debugging experience. I've put serial-in, parallel out to drive a graphic lcd because I wasn't happy with the built in (it was taking data without enable signal - probably defective LCD ... ebay). Also built in is up to 2 MHz and I wanted 16 MHz.
So I spent quite a bit time to make sire every cable on the experimental PCB goes the correct pin, /CS to ground, /PL, Clock, data to correct MCU pins. And it didn't work. I never expected it to work - nothing works from the first time. Then I checked everything and found that I didn't connect PSB (parallel/serial) pin. I did, but again nothing. So I started probing the pins. All serial data was going in and stable, but output data lines were floating (tested by pulling them up/down with 10k resistor). Well then maybe /CS not connected correctly. But it is. And all this time I was looking at LCD and shift register datasheets.
Then I got this strange idea: "What if I've put the wrong chip". I checked the markins - 74HC165 - well it's the one I intended to put. And I was just about to give up for an hour or two and then I had this crazy idea - to read the title of the datasheet - "8-bit Parallel-in/serial out shift register". What?!? That's the most stupid mistake I ever made.It's like to put a DAC instead of ADC, except this time the "data" pin fooled me, but of course the data pin was intended for daisy chain. And I intended to use it together with 74HC595 for reading keyboard and writing LCD at the same time. So the number 165 stuck into my head and I never thought about it twice. And I'm using these shift registers for years.
Well ... I'm so frustrated that will take that 1-2 hours break. I'll have to replace the chip and remove and put all the 14-15 wires again.
Lesson: next time start debugging with the quickest and easiest things - make sure you have the correct parts.
Lesson two: if you never made a mistake of a kind before, don't count on not making it in the future.
So what is your dumbest screw up?