Connect with us

noise in SPI line?

Discussion in 'General Electronics Discussion' started by russian, Aug 17, 2013.

Scroll to continue with content
  1. russian

    russian

    25
    0
    Aug 15, 2013
    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:
    [​IMG]
     
  2. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,271
    Nov 28, 2011
    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.
     
  3. russian

    russian

    25
    0
    Aug 15, 2013
    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 :(
     
  4. russian

    russian

    25
    0
    Aug 15, 2013
    I was given the solution on another forum - a 10k pull-up resistor has solved my problem.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-