0
\$\begingroup\$

I have a circuit on a PCB where I am using PIC microcontroller to connect with DS1307 via I2C. I am having trouble while programming it so I am planning to purchase a logic analyzer so that I can see what is the actual data sent or received in I2C lines. But the problem is as I am newbie to logic analyzer, I really don't have any idea about how to use them. I know i'll have to connect the wires to the line but as I have a PCB so I don't know where should I connect those wires. Can anyone here please help me out.Thanks

\$\endgroup\$
  • \$\begingroup\$ Why don't you use "Proteus" to simulate your microcontroller instead? \$\endgroup\$ – SMA.D Jan 23 '16 at 9:53
  • \$\begingroup\$ I was about to post the same question but then I found this one so thought of posting my query here. I am interfacing sd card. I need to debug the SPI channel. I want to know what response I am getting from sd card while I am sending the command. But I don't know where to plug the probe because card is inside the connector and the MCU I am using is PIC32MX795 and I don't have any other pins. Please help.! \$\endgroup\$ – user007 Feb 9 '16 at 7:27
  • \$\begingroup\$ @user007 you will need sd sniffer \$\endgroup\$ – Aircraft Feb 11 '16 at 5:11
2
\$\begingroup\$

As far as locating where to connect the logic analyzer it is between you and the PCB. Without you posting schematics and board files.

To analyze I2C there are 3 connections that need made. The data line, the clock line and ground. In the logic analyzer software you will designate where the clock and data lines are hooked up. Finally using the software record a window of data. Once the recording is complete the software will display you what was captured. The software will decode the data if any is available and display it as either hexadecimal or decimal.

\$\endgroup\$
  • \$\begingroup\$ I was about to post the same question but then I found this one so thought of posting my query here. I am interfacing sd card. I need to debug the SPI channel. I want to know what response I am getting from sd card while I am sending the command. But I don't know where to plug the probe because card is inside the connector and the MCU I am using is PIC32MX795 and I don't have any other pins. Please help.! \$\endgroup\$ – user007 Feb 9 '16 at 7:29
1
\$\begingroup\$

For I2C I wouldn't bother with a logic analyzer, there are only 2 signals to worry about, so if a scope is familiar to you, just use a scope.

If it's a digital scope you can capture a transaction and examine it - some may even have software to decode I2C but the protocol is simple enough you can do it by eye. But use a logic analyzer if you prefer.

As for where to connect the signals, I tend to solder little wire hooks or loops to the PCB - perhaps the I2C termination resistors are more accessible than IC pins.

This makes clipping scope or analyzer probes to the signals MUCH easier and safer than trying to hold them on by hand while adjusting scope knobs and writing notes with the other. You can get at least four wire hooks from a through-hole resistor, so the cost is irrelevant...

\$\endgroup\$
  • 1
    \$\begingroup\$ One of those days I'll learn to provide at least a GND test pin/pad. Not only holding the probes by hand is tedious, it is also prone to introducing noise in the measurements. \$\endgroup\$ – Vorac Jan 23 '16 at 12:26
  • \$\begingroup\$ I've seen PCBs with 0V wire rails about 10-15mm long, like hitching posts outside the saloon in cowboy movies, for 2 or 3 crocodile clips... \$\endgroup\$ – Brian Drummond Jan 23 '16 at 12:28
  • \$\begingroup\$ @BrianDrummond I was about to post the same question but then I found this one so thought of posting my query here. I am interfacing sd card. I need to debug the SPI channel. I want to know what response I am getting from sd card while I am sending the command. But I don't know where to plug the probe because card is inside the connector and the MCU I am using is PIC32MX795 and I don't have any other pins. Please help.! \$\endgroup\$ – user007 Feb 9 '16 at 7:28

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.