Shop OBEX P1 Docs P2 Docs Learn Events
Prop-1 inputs and outputs — Parallax Forums

Prop-1 inputs and outputs

haunteddansionhaunteddansion Posts: 68
edited 2007-01-27 23:05 in BASIC Stamp
How do I initialize the program so·pin 1-7 are inputs, and pin 0 is an output. What would the code looks like thanks much!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-01-27 02:50
    I think it's something like dirs %10000000

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • TechnoRobboTechnoRobbo Posts: 323
    edited 2007-01-27 19:10
    dirs %00000001

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Have Fun


    TR
  • FranklinFranklin Posts: 4,747
    edited 2007-01-27 19:16
    Sorry, wrong endian smhair.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-01-27 23:05
    Hello,

    Since all I/O pins are input by default you could just use OUTPUT 0 in your code or, if you know the default state you want the pin to output at you could use HIGH 0 or LOW 0 which will make the pin an output in that state. The rest will remain inputs. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.