I've built a circuit on a breadboard comprising a PIC18 reading from and writing to a HM6116 SRAM through a pair of 74HC595 SIPOs and a pair of 74HC165 PISOs. As you might expect, there are a bunch of parallel buses between the components. Here is my schematic:
I'm using the PIC's internal clock + PLL combo, as well as 8MHz hardware SPI with the 4 shift registers. As you can see above, the registers are cascaded to form 16-bit I/O ports for the address and data buses (multiplexed). I wrote some code to test the RAM: basically, write to the first 512 addresses, then read from them and print to the serial port for me to verify. My Proteus simulation works flawlessly.
But after painstakingly building the circuit and running the code, all I read back from the RAM are a bunch of random numbers though some seem to appear more often than others. Now, I've checked the wiring as well as I can (see jumble below), I've reduced the SPI frequency to 500 kHz, added 1 us delays in a few places in case somehow I dont meet setup and hold times (that is, if Proteus doesn't account for them). I still get gibberish.
So what I want to know is: How likely is it that the problem is due to the presence of parallel buses crisscrossing the breadboard and the resultant parasitics or EMI? Any other possibilities? I intend to order a 2-sided PCB, though only as a last resort, since they take time to arrive and are costly, given the size of my circuit. I also intend to add an Intel 8085 and an 8255 I/O chip to the bus eventually.