Shop OBEX P1 Docs P2 Docs Learn Events
setting a pin to float? — Parallax Forums

setting a pin to float?

ArchiverArchiver Posts: 46,084
edited 2003-03-03 04:19 in General Discussion
Does anyone know how to set a pin to float after setting it high or low?

Thanks,

Alina



Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-03-02 21:09
    At 12:51 PM 3/2/03 -0800, Alina Podkolinska wrote:

    >Does anyone know how to set a pin to float after setting it high or low?

    Set that pin as input.

    dwayne

    --
    Dwayne Reid <dwayner@p...>
    Trinity Electronics Systems Ltd Edmonton, AB, CANADA
    (780) 489-3199 voice (780) 487-6397 fax

    Celebrating 19 years of Engineering Innovation (1984 - 2003)
    .-. .-. .-. .-. .-. .-. .-. .-. .-. .-
    `-' `-' `-' `-' `-' `-' `-' `-' `-'
    Do NOT send unsolicited commercial email to this email address.
    This message neither grants consent to receive unsolicited
    commercial email nor is intended to solicit commercial email.
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-02 21:48
    >Does anyone know how to set a pin to float after setting it high or low?
    >
    >Thanks,
    >
    >Alina

    Assuming you are using a BS2, change the "dirs" (direction setting)
    for that pin from output to input. Then remember to change it back
    again if you need it to assert a LOW or HIGH later in the program.

    Reg
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-02 22:26
    Make it an input.


    Original Message

    > Does anyone know how to set a pin to float after setting it high or low?
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-03 01:43
    Hi Reg -

    Reginald Neale wrote:

    > ... change the "dirs" (direction setting)
    > for that pin from output to input. Then remember to change it back
    > again if you need it to assert a LOW or HIGH later in the program.

    Don't HIGH and LOW make the pin an output, then set the state?

    best regards, Jack
  • ArchiverArchiver Posts: 46,084
    edited 2003-03-03 04:19
    Yes, HIGH and LOW both set the associated DIRS bit to make the pin an output.

    -- Jon Williams
    -- Parallax

    In a message dated 3/2/2003 8:43:45 PM Eastern Standard Time, goflo@p...
    writes:

    >Hi Reg -
    >
    >Reginald Neale wrote:
    >
    >> ... change the "dirs" (direction setting)
    >> for that pin from output to input. Then remember to change it back
    >> again if you need it to assert a LOW or HIGH later in the program.
    >
    >Don't HIGH and LOW make the pin an output, then set the state?
    >
    >best regards, Jack
Sign In or Register to comment.