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

Ports

NewzedNewzed Posts: 2,503
edited 2005-05-10 15:49 in General Discussion
Why doesn't "HIGH PortB" compile?· Is the HIGH command applicable only to specific pins?

Sid

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-05-10 15:49
    HIGH only works with a single pin, and it says so right in the help file (hint, hint...).· This is no different than in the BASIC Stamp.·

    If you want to make all of the RB pins outputs and high (what HIGH does), you'd have to do it like this:

    · TRIS_B = %00000000
    · RB = %11111111


    This is similar to how we'd do it with the BASIC Stamp (though we'd use DIRL and OUTL).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.