Shop OBEX P1 Docs P2 Docs Learn Events
Understanding Output — Parallax Forums

Understanding Output

Dr.NoDr.No Posts: 60
edited 2008-04-02 22:35 in BASIC Stamp
I have the Basic Stamp Rev. D.

I would like to know the difference with these types of output pins and when to use them:

Output
low output
hight output

Thanks
jumpin.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-31 14:49
    The output pins are connected to a register that holds a value (one bit) for each I/O pin. The OUTPUT statement simply sets the I/O pin to output mode (instead of input mode) and the current value of the register bit is used to set the output pin state (1 = +5V, 0 = 0V). The LOW and HIGH statements are for convenience. They set the mode to OUTPUT and they set the value of the register bit to 0 or 1 respectively.

    Download the Basic Stamp Reference Manual (www.parallax.com/tabid/440/Default.aspx) and look at the chapters on these statements. They explain what the statements do and give examples of their use.
  • Dr.NoDr.No Posts: 60
    edited 2008-03-31 14:58
    Thanks. I appreciate it. I was just thinking along the lines of high or low current.
  • ercoerco Posts: 20,260
    edited 2008-04-02 16:38
    High=on=5 volts=logic 1
    Low =off=0 volts=logic 0

    The negative side of the battery is called ground, and is the reference for 0 volts, also known as Vss. See http://en.wikipedia.org/wiki/IC_power_supply_pin

    Circuit voltages are measured relative to ground (or Vss, or battery negative, it's all the same). The Stamp and most probably any associated circuitry are powered by exactly 5.0 volts, and digital switching drives output pins to either 0 volts (ground, Vss, low, logic 0, it's all the same) or 5 volts (Vdd, high, logic 1, all the same). If a pin is an input, the stamp measures the voltage at the pin and calls it LOW (logic 0) if it is below about 1.2 volts. Above 1.2 volts, the stamp calls it HIGH (logic 1).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Dr.NoDr.No Posts: 60
    edited 2008-04-02 22:35
    This is great. Thanks for the info.

    I used my stamp many years ago so I'm just learning it all over again.
Sign In or Register to comment.