Shop OBEX P1 Docs P2 Docs Learn Events
What states are the Parallax Propeller P2 Smart pins after a Power on or Reset — Parallax Forums

What states are the Parallax Propeller P2 Smart pins after a Power on or Reset

AndyPropAndyProp Posts: 60
edited 2024-02-28 21:40 in Propeller 2

Upon startup or reset, all I/O pins default to input (high impedance), meaning each cog's direction
registers and output registers are initialized to zero, but this state is not reflected on the pin until the pin is set to the output direction via the direction register.

So what states are the pins, floating, 3.3V or GND ?

Comments

  • @AndyProp said:
    Upon startup or reset, all I/O pins default to input (high impedance), meaning each cog's direction
    registers and output registers are initialized to zero, but this state is not reflected on the pin until the pin is set to the output direction via the direction register.

    Just read your own sentence there again and you will notice that your question makes no sense. If the direction register is zero, there is no output state. The pin is just an input.

    The pin mode registers also default to zeroes. Not sure if that also applies to the X/Y registers.

  • AndyPropAndyProp Posts: 60
    edited 2024-02-28 22:24

    @Wuerfel_21 said:

    @AndyProp said:
    Upon startup or reset, all I/O pins default to input (high impedance), meaning each cog's direction
    registers and output registers are initialized to zero, but this state is not reflected on the pin until the pin is set to the output direction via the direction register.

    Just read your own sentence there again and you will notice that your question makes no sense. If the direction register is zero, there is no output state. The pin is just an input.

    The pin mode registers also default to zeroes. Not sure if that also applies to the X/Y registers.

    I am reading "Hello Propeller P2 Examples Rev06 _pdf.pdf"
    https://www.rayslogic.com/Propeller2/Hello Propeller P2 Examples Rev06 _pdf.pdf

    where this is written, on page 4 Note "this state is not reflected on the pin" until the pin is set to the output direction.

    So to me, this means that the physical pin is not actually set to anything at power on. It may be an input but a floating input?

  • Wuerfel_21Wuerfel_21 Posts: 4,516
    edited 2024-02-28 22:37

    Upon startup or reset, all I/O pins default to input (high impedance), meaning each cog's direction
    registers are initialized to zero. Each cog's output registers are initialized to zero as well, but this low
    (ground) state is not reflected on the pin until the pin is set to the output direction (via the direction
    register).

    What he means is that the state of the output register is not reflected until the direction register sets the pin to be an output.

    @AndyProp said:
    So to me, this means that the physical pin is not actually set to anything at power on. It may be an input but a floating input?

    It actually says it right there: It's a high-impedance input by default.

  • evanhevanh Posts: 15,198
    edited 2024-02-28 23:59

    Pin inputs are always active, independent of the outputs. The only exception is if the ADC is activated, the ADC's bitstream then replaces the logic input state.
    Further reading - https://forums.parallax.com/discussion/171420/smartpin-diagram/p1

Sign In or Register to comment.