More Dirs
Archiver
Posts: 46,084
And just to add to the confusion......
From the help file after doing a search on DIRS and selecting the title
INPUT, then OUTPUT
Explanation
There are several ways to make a pin an input. When the BASIC Stamp is reset,
all of the pins are inputs. Commands that rely on output pins, like PULSIN
and SERIN, automatically change the specified pin to input. Writing 0s to
particular bits of the variable Dirs makes the corresponding pins outputs. And then
there
From the help file after doing a search on DIRS and selecting the title
INPUT, then OUTPUT
Explanation
There are several ways to make a pin an input. When the BASIC Stamp is reset,
all of the pins are inputs. Commands that rely on output pins, like PULSIN
and SERIN, automatically change the specified pin to input. Writing 0s to
particular bits of the variable Dirs makes the corresponding pins outputs. And then
there
Comments
due respect, I believe the misstatement in the documentation from Parallax.
By all means, please correct me if wrong, but I believe there is an error in
the help file, when selecting the title INPUT after searching on DIRS. The
snippet below in quotes is copied directly from the help file.
" Writing 0s to particular bits of the variable Dirs makes the corresponding
pins
outputs."
For my own peace of mind, the statement in quotes copied directly from the
help file is incorrect isn't it?
ken
========================
Just to clarify a misstatement in your post ...
A 0 (zero) bit in DIRS makes the corresponding pin an input; a 1 (one)
bit in DIRS makes the corresponding pin an output.
This is the opposite of many micros. Since all variables are
initialized to zero on reset, the BASIC Stamp uses 0 in DIRS to make the
pin an input, putting it into a safe state on power-up.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
[noparse][[/noparse]Non-text portions of this message have been removed]
A 0 (zero) bit in DIRS makes the corresponding pin an input; a 1 (one)
bit in DIRS makes the corresponding pin an output.
This is the opposite of many micros. Since all variables are
initialized to zero on reset, the BASIC Stamp uses 0 in DIRS to make the
pin an input, putting it into a safe state on power-up.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: smartdim@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=sQUFhhWs304Kn2vcILfbKrmtVH1ZenIF6L75ISryCMTuCI3DhQFwLRDOzbgDqto3cWLU7UWJJms]smartdim@a...[/url
Sent: Sunday, May 30, 2004 11:37 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] More Dirs
And just to add to the confusion......
From the help file after doing a search on DIRS and selecting the title
INPUT, then OUTPUT
Explanation
There are several ways to make a pin an input. When the BASIC Stamp is
reset,
all of the pins are inputs. Commands that rely on output pins, like
PULSIN
and SERIN, automatically change the specified pin to input. Writing 0s
to
particular bits of the variable Dirs makes the corresponding pins
outputs. And then
there's the INPUT command.
Explanation
There are several ways to make a pin an output. Commands that rely on
output
pins, like PULSOUT and SEROUT, automatically change the specified pin to
output. Writing 1s to particular bits of the variable Dirs makes the
corresponding
pins outputs. And then there's the OUTPUT command.
[noparse][[/noparse]Non-text portions of this message have been removed]
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
immediately. I was already working on a Help file update so this will
be done. I apologize for not looking at the Help file before making my
last post.
Just so everyone else (especially those coming into this conversation
late) is clear, putting a 0 into a DIRS bit makes the corresponding pin
an input.
Happy Memorial Day, everyone. Don't forget to say thanks to any vets
you encounter, especially those that served during WWII.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: smartdim@a... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=eZ3CnyJCk9IuzY44eH8sMuoSUSUqk8-sCLGpB3LSF6w9N3djXqHcXzcJ-bDEDFWTADyKnqd0zgUJ]smartdim@a...[/url
Sent: Sunday, May 30, 2004 9:22 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] More Dirs
Got it, thanks, however, I don't believe I have made a misstatement.
With all
due respect, I believe the misstatement in the documentation from
Parallax.
By all means, please correct me if wrong, but I believe there is an
error in
the help file, when selecting the title INPUT after searching on DIRS.
The
snippet below in quotes is copied directly from the help file.
" Writing 0s to particular bits of the variable Dirs makes the
corresponding
pins
outputs."
For my own peace of mind, the statement in quotes copied directly from
the
help file is incorrect isn't it?
ken
========================
Just to clarify a misstatement in your post ...
A 0 (zero) bit in DIRS makes the corresponding pin an input; a 1 (one)
bit in DIRS makes the corresponding pin an output.
This is the opposite of many micros. Since all variables are
initialized to zero on reset, the BASIC Stamp uses 0 in DIRS to make the
pin an input, putting it into a safe state on power-up.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
> you encounter, especially those that served during WWII.
>
My thanks also goes out to ALL VETS.........they are the wind in
all of our sails!
Tom Fisher
Dallas,TX