The latest paper version is 2.2 and a link to the PDF version is here. I don't know what's changed between 2.2 and 2.5.4, but I suspect that the BS2px support is part of that.
If you look at the command reference in the help file it tells you which PBASIC commands are for which BASIC Stamp models by the little colored numbers to the right of each command. Look for commands with a "1" next to them for BS1.
Look on page 82 of the Syntax and Reference Manual. PINS is the first location that corresponds to the 8 I/O pin settings. DIRS is the second location that's used to set the input (0) / output(1) direction of each pin.
At EFX-TEK we build a little controller around the BS1 called the Prop-1; you'd be surprised where it get used (from home projects to major American theme parks). I've been programming the BS1 since 1994, and still write a lot of code for our customers -- perhaps I can help.
In the BS1, the only bit-addressable variables are PINS/DIRS (which form PORT) and B0/B1 (which form W0). When I create BS1 programs, I tend to start defining byte variables at B2 to reserve B0 and B1 in case I need them later. Likewise, for word variables I start with W5 and work down, leaving W6 available for the RETURN stack should I need to use GOSUB.
Keywords related to IO pins
-- HIGH
-- INPUT
-- LOW
-- OUTPUT
-- TOGGLE
-- REVERSE
Keep in mind that other (advanced) features will often affect the state of an IO pin. BUTTON and PULSIN, for example, force the pin to input mode.
Comments
Chris
Thank you!
Self studying as much as possible so when we do have questions
they'll be halfway intelligent.
Where is the COMPLETE Basic Stamp 2.5.4 that's in Basic Stamp Editor Help as a .PDF or link?
Need to share it with associate and also access it without starting editor every time.
Thanks!
As Mike pointed out, the latest version of the BASIC Stamp Manual is V2.2
Chris
What are all the pin I/O commands?
Found DIRS, PINS, IN and OUT.
Think there's a TOGGLE.
Just Stamp 1 thank you.
All those others for Stamp 2 and PX's are a wonderful thing
but Not now Kato!
Thanks!
Mike Green, Chris
Okay so there is no standalone help.
We'll just open the editor each time and click on help.
Yes, we have a nice minty copy of the Syntax and Reference too.
Thanks!
Chris
Which ones are for the pins, the first two registers of the
Stamp 1 please?
Thanks!
Yes. Have been going over and over that part.
Want to track down all commands related to that
and find the light at the end of the tunnel.
Thanks!
Help/Commands by Category
I/0 section there are 9 commands pertaining to Stamp 1.
Pins and DIRS are not even listed in Categories.
Pin has it's on listing in Table of Contents.
Very messy. A challenge. Just like we like it!:)
Although the help topics for each command are excellent. The inclusion of
snippets of code works for us.
Thanks!
Same Help File, but click Memory Organization.
You got me there.
Pins and Dirs are not commands they are byte labels.
It's slowly coming into focus.
Will work on it tonight.
Thanks!
Chris
PIN is not one of the 9 Stamp 1 I/O commands.
So that takes care of that for now!
PIN is a command and Pins is a BS1 label within Ports with Dirs. Cleared that up.
Text bounces back and forth between calling things Commands and Directives.
Makes you stay on your toes.:)
I prefer commands.
Thanks!
PINS refers to the entire 8-bit port while PIN0 - PIN7 refer to the individual I/O pins (each bit of PINS).
Chris
Good point. PIN 0, PIN1, PIN2...
Plus the there are bit-addressable bytes in the registers.
Thanks.
In the BS1, the only bit-addressable variables are PINS/DIRS (which form PORT) and B0/B1 (which form W0). When I create BS1 programs, I tend to start defining byte variables at B2 to reserve B0 and B1 in case I need them later. Likewise, for word variables I start with W5 and work down, leaving W6 available for the RETURN stack should I need to use GOSUB.
Keywords related to IO pins
-- HIGH
-- INPUT
-- LOW
-- OUTPUT
-- TOGGLE
-- REVERSE
Keep in mind that other (advanced) features will often affect the state of an IO pin. BUTTON and PULSIN, for example, force the pin to input mode.
Mr McPhalen
Thank you.
Hearing things said a different way really helps.
You can get stuck reading Parallax documentation and just go round and round.
Working on getting some time to run pretty good snippets of code I found.
Have a nice day!