Shop OBEX P1 Docs P2 Docs Learn Events
Looking at I2C with my new scope - A question — Parallax Forums

Looking at I2C with my new scope - A question

photomankcphotomankc Posts: 943
edited 2009-10-11 21:05 in General Discussion
Alright, so I have been playing around with the DS1060 from the back of the Nuts & Volts magazine that arrived today.· Been trying to get some practice in·with it since my only other scope was a 1/2 functional beast from Tectronics (type 453) and it never was much help with digital.· So anyway I hooked it to the I2C bus on·my Propteus·board to watch the boot code load and fiddle.· I was a little surprised at what I·saw.· For some reason·my clock line looks good, nice, solid square wave but with some ringing.· The Data line however looks like·camel humps with slowly rising·traces and the short ACK pulses are just half-humps not even making it up to 3V.· I've attached a photo of·what I'm seeing.· What is weird to me is that both lines have the same pull-up (10K) so I'm not sure why one is so sharp and the other so sloppy.· Is that saying that a lower value pull-up would help?
800 x 533 - 129K

Comments

  • Carl HayesCarl Hayes Posts: 841
    edited 2009-10-11 03:57
    This may be a dumb question, but why not try it and see?· 10K is a fairly large pullup anyway.

    I spent many happy years with a 453, by the way.· It was just fine for nearly anything digital, and I was the envy of the other engineers who had slower scopes.· Now I use a 475A and usually find its slow-it-down feature very useful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-11 03:58
    The SCK line is sharp on both edges because it's being driven both high and low. The SDA line can't be driven high and relies on the pullups to reach the logic high level. The slow rise time is due to the line/gate capacitance being charged through the pullup. BTW, the correct pullup to use for I2C is 4.7K, not 10K. With the lower resistance, you will see a quicker rise time on SDA.

    -Phil
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-11 04:05
    10K is a bit high for an I2C pullup. Read some of Philips' (now NXP) documents on the subject (like www.nxp.com/acrobat_download/applicationnotes/AN10216_1.pdf). There's a discussion on page 17 of pullup resistor values. 10K is at the upper end of the acceptable range. 2K is at the lower end and the best value depends on bus speed and capacitance.
  • photomankcphotomankc Posts: 943
    edited 2009-10-11 05:07
    Carl Hayes said...

    This may be a dumb question, but why not try it and see?· 10K is a fairly large pullup anyway.

    I spent many happy years with a 453, by the way.· It was just fine for nearly anything digital, and I was the envy of the other engineers who had slower scopes.· Now I use a 475A and usually find its slow-it-down feature very useful.

    No, not dumb.· It just requires me to desolder the existing resistors and before I did that I wanted to see if that's 'just the way it is'.· As for the 453... I'll mail it to ya if you'd like it (you pay shipping)·[noparse];)[/noparse]· I got along with it for some stuff but I never really mastered it well I guess.· Now it only works when it feels like it and whatever fan the previous owner bolted onto it causes hearing loss with extended exposure.

    I checked another board and it shows the same deal, and it's assembly instructions called for 10K resistors.· I wasn't seeing it before because my I2C code is only running at 22KHz so everything looks much cleaner until you drop the timebase down.· I'll swap in some 4.7
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-10-11 05:16
    BTW, the runty pulse you see just before the /ACK is normal. It occurs when the last bit sent is a "0", followed by the bus changing hands to the receiving device. The /ACK is typically imposed on the bus by the receiving device before SDA has a chance to return all the way high.

    -Phil
  • photomankcphotomankc Posts: 943
    edited 2009-10-11 05:51
    Phil.... thanks. I wasn't remembering that ACK is 0. (Duh, anything else could just be the natural state of the bus).

    I just swapped in 2 4.7K's for the 10Ks and the rise time is now about 480ns instead of 1.9us. So it's not getting so close the rising clock edge before data's finished rising.

    I'll remember that going forward. I just saw 10Ks on a lot of schematics and didn't think much of it.
    800 x 533 - 263K
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-10-11 21:05
    photomankc said...

    As for the 453... I'll mail it to ya if you'd like it (you pay shipping)


    To quote Nessus the Pierson's Puppeteer:· Again this chance must pass me by. But thank you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
Sign In or Register to comment.