1
\$\begingroup\$

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: Circuit

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.

jumble

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.

\$\endgroup\$
11
  • 4
    \$\begingroup\$ screams internally Optimize your solderless breadboard wiring, make sure you have enough bypass capacitors, and add additional connections for ground. Then prioritize reviewing your schematic and completing a PCB. \$\endgroup\$ Aug 29 '16 at 1:37
  • \$\begingroup\$ You're welcome. \$\endgroup\$ Aug 29 '16 at 1:49
  • 2
    \$\begingroup\$ Yes, using shorter wires is a good priority. At a minimum, get a couple colors of solid core wire and a set of reasonable wire strippers. An additional set of pre-formed wire jumpers would also help for the shortest connections, but are not a priority. \$\endgroup\$ Aug 29 '16 at 2:24
  • 1
    \$\begingroup\$ Get an oscilloscope, NOW! Since you have a deadline and use proteus it sounds like you're doing this in school. There must be an oscilloscope around somewhere. Use it to actually look at the problematic signals. You'll see right away if everything comes out like they should. \$\endgroup\$
    – pipe
    Aug 29 '16 at 5:29
  • 2
    \$\begingroup\$ @TisteAndii No, the logic analyzer doesn't show you the analog signal, so you don't know if you have problems with excessive ringing, slew rate, overshoot, interference, and all that. A logic analyzer is awesome after you know that the electrical signal integrity is good. At the moment, you don't really know that. Chris' advice is good though, slowing down everything to something like 1 Hz. \$\endgroup\$
    – pipe
    Aug 29 '16 at 10:59
4
\$\begingroup\$

I would agree on the likelihood of a wiring error (or else a design error), but would dispute the best solution for a complex system, particularly with parallel data paths (though we don't see as many of those today).

The problem with the preformed kits is that they restrict your color choice, and probably aren't long enough to go between multiple modules. (I probably could be talked into paying for a set of perfectly formed ones for ground straps and very short jumpers though)

Instead, for a complex project get yourself some good 22 gauge hookup wire in multiple colors, or if you can find some that fits well, surplus solid core telecom cable to split into individual wires.

I did enough breadboarding in childhood, that by the time I was assigned to build a fairly complex system in a course lab in engineering school, I realized I needed to do it in a way that would be durable and debuggable.

  • I used the same four colors in quasi-spectral order for busses. An 8-bit bus meant using them twice, but the bit position / color assignment remained constant in each nibble. If memory matches what I'd do today, the bus colors were never used for anything else - power, ground, config strappings and selects used something else.

  • No wires over chips (possible exception for a rare direct "staple")

  • Runs were grouped together, and often held down with short pieces of wire stuck in power buses or unused holes.

One could try to make a theoretical argument that running signals together in routing channels / bundles increases crosstalk, but the reality is that for the types of digital systems properly built on breadboards, crosstalk is not the problem.

Wires falling out, and not being able to figure out which hole they go back into, or which wire is which, is the problem.

\$\endgroup\$
0
\$\begingroup\$

Odds are you have a wiring error in that rats nest. Flexible wires are for going off your breadboard. For connections between holes on the breadboard, you should be using preformed solid wires that are sized to span between fixed numbers of holes and lie snug against the board. It'll make it much easier to debug. Here's an example from Amazon: Breadboard jumper wires

\$\endgroup\$
0
\$\begingroup\$

You can get Dupont cables made out of ribbon cable. They can be torn apart to make them into groups of however many you need.

Using these for your busses will tidy up your board immensely. It'll also make it much easier to spot any crossed wires.

\$\endgroup\$
4
  • \$\begingroup\$ I'm fairly sure they're already using this. \$\endgroup\$ Aug 29 '16 at 5:50
  • \$\begingroup\$ @IgnacioVazquez-Abrams All of the wires in the picture look separate to me. If there are any ribbon cables in there, they're very well hidden. \$\endgroup\$
    – user39382
    Aug 29 '16 at 5:52
  • \$\begingroup\$ I never claimed they were using it properly. The asker has separated them into individual wires. \$\endgroup\$ Aug 29 '16 at 5:53
  • 2
    \$\begingroup\$ These are better than the horrible round overmold type (which may or may not be what is pictured) for simple and very temporary setups, and especially where you may need something with a female end. But they are still no good for complex or lasting use within breadboard setups, as they put the bending point far too high above the breadboard, encouraging the kind of ratsnest that appears to be the origin of the problem. Once you get above 10-20 connections on a breadboard, or expect things to last, you really should use dedicated wires. \$\endgroup\$ Aug 29 '16 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.