Hi all ,
iam using the 16ch saleae logic analyser ,
iam recording the analog session, one of a SPI communication pin , most of the time it is reading negative voltage of approx 250mV.
why is it so, and i dont want to get this -ve voltage.
Most likely you have a bad ground connection. Note that the ground pins on the logic analyser are the USB ground.
One possibility is that you have earth leakage current that is affecting the 0 Volt level the analyser is seeing. This can particularly be an issue if the measurement point you are using for the ground on the device under test (DUT) is not actually a ground point. It can also be an issue when there is significant earth current in your mains wiring system, perhaps due to a faulty device that may even be in a different room than your system is in.
Another possibility is that you have significant current flowing in some of the ground traces in your DUT and this is generating a difference between the ground seen by the SPI bus and the ground seen by the analyser.
A third possibility is that there is some internal offset in the analyser. That is quick to check by connecting the input pin on the analyser to one of the analyser’s ground pins.
And just to reiterate something I’ve said many times on here: if you can help it, do NOT let your grounds connect to earth ground. If possible, keep it all floating. Use a laptop that has a good battery and don’t plug that laptop in. This drastically limits the ability of your computer (and thus Logic 16) to be at a different grounding potential than the DUT. Using a desktop machine is problematic because it basically always has a connect to earth ground. Logic probes, multimeters, and oscilloscopes tend to be best when they’re not externally ground referenced and float at the ground potential of the DUT.
Colin was pointing out that the Logic 16 measurement ground is connected to the host computer’s ground. For desktop computers the ground is almost always connected to the local mains ground. If you think about that and my earlier comments you will see that there is a problem if the reference point (ground or 0V usually) for the device you are testing is not 0V with respect to mains ground.
You can avoid the problem if you use a computer that is not connected to ground. Using a laptop that is not connected to anything other than the Logic 16, including not connected to a power supply, avoids the ground problem - the first possibility that I mentioned in my reply.
Using a laptop in this way doesn’t address the two other possible problems I mentioned.
Another thing to be aware of is that the ground pins on the Logic 16 are internally connected together so using two ground connections connected to different power rails or voltage reference points will at least create measurement errors and is likely to damage equipment.
Another simple check: did you connect at least one of the all black ground wires to the target, or just the colored/numbered wires? Is the ground wire connected to the same ground as the SPI data lines (i.e., ideally, an MCU ground pin or the voltage regulator/supply ground pin)?
If not, then the secondary ground reference you might be getting through the Logic USB cable / host computer / computer power cable / wall/main power wiring / back to the power supply connected to the target device may have a grounding voltage offset vs. directly grounding at the probe cable.
If your PC is not connected to wall/main power ground, then you really want to be sure one of the ground pins is connected to the target device, or the voltage offset could be worse.
Bottom line: you need good grounding to get good measurements.