2
\$\begingroup\$

I’m reverse engineering an existing microprocessor to microprocessor serial signal. When I put my scope on the target device I see the clock and data lines just fine on my scope when I connect it to either the chip pin or the pin on the IDC connector on the PCB.
I then made my own board with an IDC connector and some breakout pins and I’m getting the following on my scope for the data line (my clock line is just fine). I resoldered just in case and checked all connections.

On the target PCB with the microcontroller there is a 4700 ohm resistor between the connector and the pin and a capacitor at the pin to ground. It’s SMD so it doesn’t say any values. I tried recreating this on my own board with a 1uf (I think) cap and 4.7 resistor and it doesn’t change anything. The triangle waves loosely match what I’d expect with my data square signals. I've included what the PCB circuit has and if i measure at the IDC connector on the PCB or at the chip SO/SI inputs i get the same square waves.

Any ideas? I’m very new to this level of hardware work and bought the scope just for this…

signal when I read the IDC connector only away from PCB board

circuit diagram for PCB board where signal looks normal

picture of pcb - hard to see but in yellow is circuit in question

\$\endgroup\$
5
  • 1
    \$\begingroup\$ What bus between which devices you are reverse-engineering? \$\endgroup\$
    – Justme
    Mar 11 at 0:51
  • \$\begingroup\$ Probe on x10. Make sure your probe ground is connected to an actual ground point near the signal you are trying to measure. Make sure BW limit on the scope channel is off. \$\endgroup\$ Mar 11 at 2:03
  • \$\begingroup\$ it looks like capacitance in series with the singnal, but that's not the whole story. \$\endgroup\$ Mar 11 at 3:48
  • \$\begingroup\$ You should probably measure the original board's capacitor with an LCR meter. It's probably going to be significantly less than a microfarad. \$\endgroup\$
    – Hearth
    Mar 11 at 15:45
  • \$\begingroup\$ There are fast falling edges and slow rising edges. I would expect to see this on a bus with open drain outputs like the 1wire bus or bad implemented I2C. But there are some fast rising edges as well. Can you please provide a scope track of the original, correct signal for comparison? It would also help to see the SO signal on a separate track. \$\endgroup\$
    – Jens
    Mar 12 at 4:02

3 Answers 3

5
\$\begingroup\$

Answer revised after circuit diagram added to question...

  • The 1uF capacitors are too high a value by order(s) of magnitude. Data Line filter
  • Is the 10 kOhm resistor on the correct pin?

A suggestion is to follow the procedure until a problem is detected. If the effect on all data/clock lines is unchanged when every capacitor and the cable is removed i.e there is no load on the device under test then try the following procedure until the problem is detected.

  1. Use two 10:1 probes if your RIGOL measurement device has two or more channel. This is just to confirm you don't have a single defective probe. Otherwise just continue with a single probe if that is all you have.
  2. Check the probe(s) compensation adjustment using the RIGOL 'Probe Compensation: Measurement signal (5V/1kHz) output' or whatever is provided on the front panel for probe compensation adjustment. Ensure that you have an adjustment range to go from under compensated square wave to over compensated. This is just to confirm a probe(s) tip is making electrical contact to the probe body and cable. Also a probe is set as 10:1.
  3. Use the earth/ground lead supplied with the probes (usually very short with a crocodile clip). Ensure this probe shield is connected to the earth/ground of the circuit under test. This is a most dangerous assumption I can make as I don't know how power and mains isolation is arranged. If for example the device under test is at mains potential you could damage the device under test, the testing device and worst case kill your self. Be aware of what you are doing and ensure your safety. Don't assume the you can rely on a earth/ground connection thgrough the mains cable.
  4. Use the probe(s) to check the power supply DC voltages are correct i.e. the measurement device is DC coupled.
  5. Check the data lines with capacitors and cables disconnected. Ensure the data signals driving the output are correct levels and waveshape.
  6. Connect the resistors but with the cables and capacitors disconnected. Check the data lines again to ensure they are still valid.
  7. Move the probe's earth connection to the earth point that will be used by the cable. Check the data lines again to ensure they are still valid.
  8. Reconnect the cable without the capacitors or any connection to the circuits to be driven. Check the data lines again to ensure they are still valid. This is a test of the driving circuits. Ensure there are pullup resistors if the device can not drive an open circuit/unterminated cable. Confirm with a data sheet the actual requirements for driving a load.
  9. Connect the probe to the far end of the open circuit cable and ensure the data lines are still valid.
  10. Connect the cable to the circuits that are going to be driven. Check the data lines again to ensure they are still valid at both ends of the cable.

At some point up to here you should have re-established the circuit conditions that were causing the defect. If everything is correct up to this point then the problem is likely to have been a form of earth/ground or measurement error.

Going to need more information about circuits if it is a load problem that only happens at step 10. For example are the capacitors mis-wired, etc.

If everything is OK at step 10 then selection of a suitable noise filter capacitor a fraction of the size of the 1uF is required

  1. Have you confirmed with the data sheet for the new IC the appropriate location of the 10 kOhm resistor? Is this on the correct pin i.e. should it be on the SI pin?
  2. Have you confirmed any datasheet recommendations for the noise filter capacitors? I would have expected a recommendation in the pF range.
  3. Have you confirmed the cable length is appropriate? Is it too long?
  4. Have you confirmed the boot programming requirements of the SPI interface?
\$\endgroup\$
4
  • \$\begingroup\$ Ok but I get this signal when I read the data line with or without a cap to ground…. \$\endgroup\$
    – DaveInPA
    Mar 11 at 1:04
  • \$\begingroup\$ I’ve followed all your suggestions but I haven’t removed the caps and resistors on the pcb board yet. It’s a working board and it’s old so can’t be replaced so I’m going to save that last. Please note the board works perfectly fine. It’s only when I read the data line at the end of the cable disconnected where I get this signal. Otherwise it’s a normal square wave signal. Here is picture of pcb and I’ve confirmed SI and SO. The microcontroller is a Fujitsu 8 bit from 2008. According to data sheet no mention of SPI, I2C, or uart…just 8 bit serial. \$\endgroup\$
    – DaveInPA
    Mar 12 at 11:17
  • \$\begingroup\$ I don't have any experience with RIGOL. To me the CRO appears to be reporting that the data signal has offset its scale to -80mV and the +ve peak is nearly +6V. Not values I'd expect to see if the probe was appropriately grounded and DC coupled. If you were using a 10:1 probe then the CRO may be reporting -800mV to nearly 60V. Neither measurement seems reasonable if this was 5V logic. What does the data sheet report the serial voltages should be? It may be helpful to post a photo of the data at the SO pin and the cable in dual channel mode. Also very strange transients in long exponentials \$\endgroup\$
    – PDP11
    Mar 12 at 14:20
  • \$\begingroup\$ It could just be that I moved the signal down on the screen. I’ll double check the measurements thought. \$\endgroup\$
    – DaveInPA
    Mar 12 at 18:30
1
\$\begingroup\$

The capacitance on the bus is too high or the drive strength too low. It's making an RC time constant that is most likely too long. Also make sure the probe is not a 50 ohm probe

\$\endgroup\$
1
  • 1
    \$\begingroup\$ So why does the signal look fine on the target device when I measure it at the microcontroller pin? Is the resistor and cap on the pcb fixing the problematic signal? When I measure th3 signal off the pcb I get the picture above. So either something on the pcb is fixing the signal or I’m do8ng something wrong measuring it raw from my own idc connector. \$\endgroup\$
    – DaveInPA
    Mar 11 at 1:31
0
\$\begingroup\$

After help from these answers and from more research and scope work I think I’ve figured out the general cause of the signal looking like this when one end of the serial transmission is removed from the receiving pcb board. Basically the ribbon cable is floating - or actually the transmitting microcontroller pin is floating.

I need to do more work but the 2 sides (microcontrollers) are doing some sort of coordinated pull high and pull low on the data line as part of the protocol. This is similar to how I2C and some other serial protocols work with multiple slaves/channels.

In my case it’s a proprietary protocol (I think) and I only have one channel. The slow rise from low to high between data bits is because the receiving side is floating (reading just my ribbon cable). I guess the ribbon cable has capacitance and resistance so it’s acting like a typical RC circuit with a charging curve. Until the transmission side is ready to send a data bit and then it drives it low or high.

So the resistors and cap on the pcb board have nothing to do with it. It’s the pull-up or down configurations of the microcontroller pins on both sides that is doing all of this…

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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