Shop
OBEX
P1 Docs
P2 Docs
Learn
Events
Ports — Parallax Forums
toggle menu
Categories
Discussions
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Sign In
·
Register
×
Home
›
General Discussion
Ports
Newzed
Posts:
2,503
2005-05-10 15:35
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 Williams
Posts:
6,491
2005-05-10 15:49
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.
Comments
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