Sorry, it's late there so you won't get this until tomorrow.as it seemed to work when I thought I had the pins wrong so switched them for a second at the start
I'm not convinced that moving wires around randomly is a good design methodology. The only time I would agree is for serial communication, where transmit and receive are always different to what you expect, so swapping them over if you get no joy is a worthwhile thing to try. However, even in this case your ground pin shouldn't be swapped with anything.
In this case we know where the pins go, and we know the function of each chip. If it's not working then we have overlooked something fundamental (does happen), or some tiny detail.
I can think of two potential issues that might cause it not to work.
First, the HCT165M is specified to operate from 4.5 to 5.5V. We are running them at 3.3V because some rando on the internet said it would be fine. I have no problem with that, as I, myself, am also some rando on the internet. However, it might be a problem.
Second, the Pico is very fast, and it may be toggling the clock pin too fast to drive the shift register reliably. Modern logic chips are also fast, so it might be a non-issue, but it's still worth investigating. We can introduce some delays in the software, which is easy to do.
According to the schematic, which I literally conjured from thin air*, U9 is the shift register that is immediately connected to pin 4 of JP1. Thus the switches connected to U9 are the first ones that are clocked out of the PCB. Could you figure out which buttons are connected to U9 pins 3, 4, 5, 6, 11, 12, 13, 14? I don't know where U9 is on the PCB, but if it's near the 4-way ribbon cable that you cut off it's possible that three of the pins on the 4-way cable go to the shift register (the fourth pin should be ground). If there are only a couple of buttons attached to U9 then the next chip in line is U5. Please do the same thing and work out which buttons are connected to U5.
* Yes, I made it up. My intention was for it to be correct, but it could be a complete fantasy. Please bear that in mind, but you do have the tools and skills to verify it for yourself.
Statistics: Posted by ame — Thu May 16, 2024 12:34 am