Maker Pro
Maker Pro

noise in SPI line?

I have a mcp3208 ADC chip in a breadboard wired to an stm32 board. The board is powered via the USB, SPI frequency is 160Hz

Things work great only if I have a USB logical analyzer connected to the MISO line. With the analyzer plugged into another USB port, I have a 100% success rate in my SPI communications.

As soon as I disconnect the analyzer, I start seeing a 30-50-80% error rate: the initial bits of the response are wrong in half of the SPI responses.

I've tried grounding the MISO line with 2pf. 10pf. 100pf etc capacitors to no avail. Please help :) I have no idea how the analyzer fixes what problem, but it must be doing something?

Here is a picture just to give a better idea of my setup:
 

KrisBlueNZ

Sadly passed away in 2015
1. Check your ground connection between the board and the breadboard. Perhaps the USB logic analyser is making the ground connection when you plug it in!
2. Also, minimise the length of the ground wire to reduce its inductance to minimise ground bounce at the ADC.
3. If edges are too steep, try inserting a low-value resistor in series with the signal. Something like 33 ohms is a common choice.
4. For parallel termination, use a capacitor and a resistor in series. For example, 100 pF and 150 ohms or thereabouts.
5. In my experience, problems with the clock line are the most common. Even if you're sure the MISO line is the problem, try properly terminating the clock line as well.

Good luck! Let us know how you get on.
 
1. the USB logic analyser is not grounded to the board, the only wire between the analyzer and the breadboard is one channel input wired to my MISO line. Actually, I went further and cut the USB cable between the analyzer and the desktop and left only the ground wire. This way my analyzer is just a passive blackbox between my MISO line and my desktop ground.

2. shorter wired did not help :(
3. 30ohm between chip MISO and board MISO did not help
4. I've tried chip pin > 150 ohm > 100pf > ground for both MISO and CLK pin and it did not help :(
 
Top