Shop OBEX P1 Docs P2 Docs Learn Events
I2C pullups needed — Parallax Forums

I2C pullups needed

MX21MX21 Posts: 7
edited 2006-04-14 21:12 in Propeller 1
Are pullups needed on pins 28 and 29 for the SDA and SCL lines?
It looks like they aren't there in various example circuits, but
there is a 10k resistor between SDA and RESn.· What's that for?

Once the pins turn into GPIO after bootup, will I need to have
pullups to bit-bang the i2c from spin?

Thanks,

MX
·

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-14 20:16
    If you look at our "minimum" stand-alone circuit you'll see that the SDA is pulled up (connected to the RSTn line which can source a bit of current). The SCL line is driven high and low by the propeller. If you want to use this pins for additional I2C devices you can, you simply need to add a pull-up to the SCL line and write a bit of code to bit-bang the I2C protocol.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • MX21MX21 Posts: 7
    edited 2006-04-14 20:56
    They are not open collector, right? So SDA will have to switch between input and output
    direction when bit-banging the I2C, correct?

    MX
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-04-14 20:59
    Correct, with the output value set low.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    1+1=10
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-04-14 21:12
    If you write an I2C object that follows the specification, either line will be made an output-low to write a zero bit, and left to float (made an input) for a one bit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
Sign In or Register to comment.