BS40p AUXIO/MAINIO
Archiver
Posts: 46,084
I've a quick question regarding the BS40p 40 pin stamp with extra io
pins... I've read through the Basic Stamp v2 manual and it gives the
impression that you basically switch between the 2 sets of io pins
using AUXIO and MAINIO...does that mean that if (for example)
I have a switch and an LED connected to the AUXIO pins so that the
switch lights the led.. nice and simple.
I also have another switch and led connected to the MAINIO pins..
If I have NOT issued an AUXIO command in my program but press the
switch connected to the AUXIO pins the LED will NOT light.. in effect
the switch is ignored until I do an AUXIO.. similarly if I do have an
AUXIO command in my program until I then do a MAINIO command that LED
would not be affected ..
Is that a correct understanding?
Thanks
Andy
pins... I've read through the Basic Stamp v2 manual and it gives the
impression that you basically switch between the 2 sets of io pins
using AUXIO and MAINIO...does that mean that if (for example)
I have a switch and an LED connected to the AUXIO pins so that the
switch lights the led.. nice and simple.
I also have another switch and led connected to the MAINIO pins..
If I have NOT issued an AUXIO command in my program but press the
switch connected to the AUXIO pins the LED will NOT light.. in effect
the switch is ignored until I do an AUXIO.. similarly if I do have an
AUXIO command in my program until I then do a MAINIO command that LED
would not be affected ..
Is that a correct understanding?
Thanks
Andy
Comments
AUXIO and MANIO except it can be a constant or variable.
Chuck[/font]
from the switch, and not until you do, right? So just
make sure you are looking for the right input. Try
something like this:
LOOP:
MAINIO
OUT4 = IN3 ' LED on 4, switch on 3
AUXIO
OUT4 = IN3 ' same on other side
GOTO LOOP
And since your dealing with two homogenous sides,
another approach is:
a VAR BIT
a = 0
LOOP:
IOTERM a
OUT4 = IN3
a = ~a
GOTO LOOP
I have heterogenous pin configurations on the two
sides, with all regular inputs on MAINIO, all serial
inputs (shift registers and ADC's) on AUXIO, and some
outputs on each side. I am trying to force myself to
call out MAINIO or AUXIO before all I/O operations.
IOTERM is only useful if the same pin numbers are used
for identical purposes on both sides, but then it is
extremely useful.
Bob Pence
--- andy_powell_is@y... wrote:
> I've a quick question regarding the BS40p 40 pin
> stamp with extra io
> pins... I've read through the Basic Stamp v2 manual
> and it gives the
> impression that you basically switch between the 2
> sets of io pins
> using AUXIO and MAINIO...does that mean that if (for
> example)
>
> I have a switch and an LED connected to the AUXIO
> pins so that the
> switch lights the led.. nice and simple.
>
> I also have another switch and led connected to the
> MAINIO pins..
>
> If I have NOT issued an AUXIO command in my program
> but press the
> switch connected to the AUXIO pins the LED will NOT
> light.. in effect
> the switch is ignored until I do an AUXIO..
> similarly if I do have an
> AUXIO command in my program until I then do a MAINIO
> command that LED
> would not be affected ..
>
> Is that a correct understanding?
>
> Thanks
>
> Andy
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed
> with. Text in the Subject and Body of the message
> will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/