Shop OBEX P1 Docs P2 Docs Learn Events
Open Drain Ports — Parallax Forums

Open Drain Ports

Sal AmmoniacSal Ammoniac Posts: 213
edited 2009-11-17 21:53 in Propeller 1
I'm starting a new project and will be using a Propeller chip. I don't have much experience with the Propeller, only what I've read here in the forum and in the datasheet.

Do the Propeller I/O pins support an open-drain configuration? I didn't see any mention of it in the datasheet and will need this capability to implement interfaces to things like multi-master I2C buses.

Comments

  • whickerwhicker Posts: 749
    edited 2009-11-17 19:10
    take a look at the object exchange if you haven't already in regards to the I2C.

    It is not a configuration, but since you have a direction and data register for the pins, instead of togging the data to 1 or 0, you can toggle input or output.


    If you set the data register for that pin to 0, then set the direction to output it will pull low. If you set direction to input, it will be HI-Z.

    Same thing if you want to only source, set data to 1, set direction to output or input.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-17 19:17
    As whicker mentioned, the I/O direction register is normally used to effectively implement an open-drain output where the I/O output register bit for the I/O pin is left set to zero and the I/O direction register bit is switched between zero (input - high-Z) and one (output low)
  • Sal AmmoniacSal Ammoniac Posts: 213
    edited 2009-11-17 19:36
    Excellent. Thanks.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-11-17 21:53
    This is a pseudo open-drain configuration only which works as long as the load is tied to the same voltage or less as the I/O port (3.3V). A true open-drain does not have any connection to VDD which is not the case with I/O ports which have the substrate "diode" from the drain to VDD. As soon as the voltage on the pin/drain goes 0.3V higher than 3.3V the diode will conduct and it's not pretty.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*
Sign In or Register to comment.