Multiplexing (?)
On 26 Dec 00 at 18:25, Yanroy wrote:
> Is it possible to put more than one I/O device on a pin for a
> BS2/2sx?
Yes.
> If so, how do you do it (or could you point me to a tutorial).
It would depend to a very great extent on the devices involved. If
you would be more explicit regarding what it is you want to do, your
chances of getting a useful answer are bound to improve.
> I read that the new stamp has support for one-wire devices, is
> that what I am talking about?
The 1-Wire bus is designed to accomodate several 1-Wire devices via
one I/O path. However, running multiple 1-Wire devices off one
BS2SX+ I/O pin may offer some daunting programming challenges
depending on how you would access the devices. Again, it depends on
what you mean to do...
Steve
> Is it possible to put more than one I/O device on a pin for a
> BS2/2sx?
Yes.
> If so, how do you do it (or could you point me to a tutorial).
It would depend to a very great extent on the devices involved. If
you would be more explicit regarding what it is you want to do, your
chances of getting a useful answer are bound to improve.
> I read that the new stamp has support for one-wire devices, is
> that what I am talking about?
The 1-Wire bus is designed to accomodate several 1-Wire devices via
one I/O path. However, running multiple 1-Wire devices off one
BS2SX+ I/O pin may offer some daunting programming challenges
depending on how you would access the devices. Again, it depends on
what you mean to do...
Steve
Comments
think this is called multiplexing, but I am not sure. If so, how do you do
it (or could you point me to a tutorial). I read that the new stamp has
support for one-wire devices, is that what I am talking about? I don't feel
like waiting and then spending a lot more money to get the new stamp if I
can do it with my current BS2.
______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com/?sr=signup
writes:
think this is called multiplexing, but I am not sure. ·If so, how do you do
it (or could you point me to a tutorial). ·I read that the new stamp has
support for one-wire devices, is that what I am talking about? ·I don't feel
like waiting and then spending a lot more money to get the new stamp if I
can do it with my current BS2.
You CAN'T do 1-Wire with the current Stamp (BS2, BS2e, BS2sx) and doing I2C
and parallel LCD I/O takes a lot of work. ·The BS2p is definitely worth the
money and will become the default Stamp for my Nuts & Volts column.
-- Jon Williams
-- Dallas, TX
[/font]
parkiss@earthlink.net writes:
one I/O path. ·However, running multiple 1-Wire devices off one
BS2SX+ I/O pin may offer some daunting programming challenges
depending on how you would access the devices. ·Again, it depends on
what you mean to do...
It's not too tough. ·Yes, you have to send the 10-byte ROM ID, but the
structure of OWOUT makes it pretty easy. ·Here's a snippet (the ROM patterns
for known devices are stored in DATA statements):
GetTemp:
·FOR idx = 0 TO 7 ' load ROM pattern
···READ (eeAddr+idx),romData(idx)
·NEXT
·OWOUT DS1820pin,OW_FERst,[noparse][[/noparse]MatchROM,STR romData\8,ConvertTemp]
WaitForConversion:
·PAUSE 25
·OWIN DS1820pin,OW_BitMode,[noparse][[/noparse]tempIn]
·IF tempIn = 0 THEN WaitForConversion
·OWOUT DS1820pin,OW_FERst,[noparse][[/noparse]MatchROM,STR romData\8,ReadScratch]
·OWIN ·DS1820pin,OW_BERst,[noparse][[/noparse]tInLow,tInHigh]
-- Jon Williams
-- Dallas, TX
[/font]
If you simply need more than 16 I/O pins, you may use the 74HC165 and/or the
74HC595 to add respectively input and/or output.
They are shift registers. The 165 is a parallel in - serial out register,
and the 595 is a serial in - parallel out register. They both are
cascadable, so you can add a lot of I/O pins, if your process is not too
fast (serial in and out require time...). You only need 4 or 5 Stamp lines
to manage 8 more inputs AND 8 more outputs.
Let me know if this is what you need. I'll let you know more of my own
experience about that.
Best regards,
Phil.
Original Message
From: Yanroy <yanroy@u...>
Subject: [noparse][[/noparse]basicstamps] Multiplexing (?)
> Is it possible to put more than one I/O device on a pin for a BS2/2sx? I
> think this is called multiplexing, but I am not sure. If so, how do you
do
> it (or could you point me to a tutorial). I read that the new stamp has
> support for one-wire devices, is that what I am talking about? I don't
feel
> like waiting and then spending a lot more money to get the new stamp if I
> can do it with my current BS2.