expanding i/o ports
Archiver
Posts: 46,084
I think this question may have been asked before so please pardon my
ignorance. For my application I need to be able to control 120 (at least)
separate output lines from the Stamp. Since the BS2 only has 16 I/O lines
that creates kind of a problem. Does anyone have any ideas about this? It
seems like it would be a frequent problem. One of my thoughts is to output
serial data from a BS pin to some kind of IC that expands the data and has
an output pin for each of the bits in the serial data. If the IC was 16-bit
I would only need eight of them and use eight BS pins, which would be a lot
of wiring but ultimately OK. Unfortunately I can't find such a device. Any
suggestions?
Thanks,
JC
--
John D. Collier (jcollier@a...)
Precision Engineering Research Laboratory
Boston University
8 St. Mary's Street
Boston, Massachusetts 02215
617-353-9370 (lab)
617-353-8659 (fax)
ignorance. For my application I need to be able to control 120 (at least)
separate output lines from the Stamp. Since the BS2 only has 16 I/O lines
that creates kind of a problem. Does anyone have any ideas about this? It
seems like it would be a frequent problem. One of my thoughts is to output
serial data from a BS pin to some kind of IC that expands the data and has
an output pin for each of the bits in the serial data. If the IC was 16-bit
I would only need eight of them and use eight BS pins, which would be a lot
of wiring but ultimately OK. Unfortunately I can't find such a device. Any
suggestions?
Thanks,
JC
--
John D. Collier (jcollier@a...)
Precision Engineering Research Laboratory
Boston University
8 St. Mary's Street
Boston, Massachusetts 02215
617-353-9370 (lab)
617-353-8659 (fax)
Comments
outputs. The data lines are tied in parallel using separate clock
lines, You would need 12 IO lines for 8 chips.
John Collier wrote:
>
> I think this question may have been asked before so please pardon my
> ignorance. For my application I need to be able to control 120 (at least)
> separate output lines from the Stamp. Since the BS2 only has 16 I/O lines
> that creates kind of a problem. Does anyone have any ideas about this? It
> seems like it would be a frequent problem. One of my thoughts is to output
> serial data from a BS pin to some kind of IC that expands the data and has
> an output pin for each of the bits in the serial data. If the IC was 16-bit
> I would only need eight of them and use eight BS pins, which would be a lot
> of wiring but ultimately OK. Unfortunately I can't find such a device. Any
> suggestions?
>
> Thanks,
> JC
>
> --
> John D. Collier (jcollier@a...)
> Precision Engineering Research Laboratory
> Boston University
> 8 St. Mary's Street
> Boston, Massachusetts 02215
>
> 617-353-9370 (lab)
> 617-353-8659 (fax)
>
> I think this question may have been asked before so please pardon my
> ignorance. For my application I need to be able to control 120 (at least)
> separate output lines from the Stamp. Since the BS2 only has 16 I/O lines
> that creates kind of a problem. Does anyone have any ideas about this? It
> seems like it would be a frequent problem. One of my thoughts is to output
> serial data from a BS pin to some kind of IC that expands the data and has
> an output pin for each of the bits in the serial data. If the IC was 16-bit
> I would only need eight of them and use eight BS pins, which would be a lot
> of wiring but ultimately OK. Unfortunately I can't find such a device. Any
> suggestions?
Something like a 74154 (4 line to 16 line) or a 74138 (3 line to 8 line)
decoder, cascaded to use 8 stamp outputs as addresses for the individual
pins on the decoders.
>>
>> I think this question may have been asked before so please pardon my
>> ignorance. For my application I need to be able to control 120 (at least)
>> separate output lines from the Stamp. Since the BS2 only has 16 I/O lines
>> that creates kind of a problem. Does anyone have any ideas about this? It
>> seems like it would be a frequent problem. One of my thoughts is to output
>> serial data from a BS pin to some kind of IC that expands the data and has
>> an output pin for each of the bits in the serial data. If the IC was 16-bit
>> I would only need eight of them and use eight BS pins, which would be a lot
>> of wiring but ultimately OK. Unfortunately I can't find such a device. Any
>> suggestions?
John:
An easy way to do this to use the SHIFTOUT command and send your data in
serial form to a string of shift registers (SR). I use a string 74164s for
28 outputs to drive indicating LEDs on a model railroad control panel.
Eight outputs per chip and you only need two I/O lines for as many as you
want, a third one can be used for some other chips where you load them and
then output later. The only limits that I can see would be program space
and if you get too many chips you might have to use a buffer amp for the
clocking line that feeds them all in parallel. I've also seen this done
where the SRs are separated some distance from each other, and close to
their loads, needing only two lines, plus power to connect them.
I use the same technique with SHIFTIN and 74165s to bring data in from 20
push buttons on the same control panel. There are more modern SRs with
nice features but my junk box had a stack of old power hungry TTL :-)
Wayne
Wayne Roderick P.E. (EE, ret)
CEO, Teton Short Line, (NMRA life-1721)
e-mail tetonsl@i... Pocatello Idaho, USA
http://www.ida.net/users/tetonsl/railroad
Note new URL- /biz/ becomes /users/
Some may be interested to know that I found exactly what I was looking for
at Allegro Microsystems (http://www.allegromicro.com). They sell
serial-input I/O expanders with high current ratings on the output pins (up
to >1A) which is what I needed.
JC
> From: John Collier <jcollier@a...>
> Date: Sat, 16 Sep 2000 11:47:33 -0400
> To: <basicstamps@egroups.com>
> Subject: expanding i/o ports
>
> I think this question may have been asked before so please pardon my
> ignorance. For my application I need to be able to control 120 (at least)
> separate output lines from the Stamp. Since the BS2 only has 16 I/O lines that
> creates kind of a problem. Does anyone have any ideas about this? It seems
> like it would be a frequent problem. One of my thoughts is to output serial
> data from a BS pin to some kind of IC that expands the data and has an output
> pin for each of the bits in the serial data. If the IC was 16-bit I would only
> need eight of them and use eight BS pins, which would be a lot of wiring but
> ultimately OK. Unfortunately I can't find such a device. Any suggestions?
>