Mux with memory in outputs?

Oct 20, 2010 10 Replies

Hi!



I have a new project and to solve the lack of digital outputs I am going to add a mux and some memory IC



The problem is that I need to control 16 outputs, lets name it from 1 to 4 = A, from 5 to 9 = B and so on, but I have only 4 pins available in my uC



My first approach is to use a mux, but I am going to control relays, so I need to hold the state for the 15 outputs that the mux is not multiplexing.



The answer is to use a simple FF-D, but I dont have a clk signal for this porpuse, maybe a JK



Do you know if something like a MUX with memory exist? or how ca I implement it


Thanks I appreciate any help


A latching shift register. Conceptually, you'll have one pin as serial data in, one as clock, and one as latch. Clock in all 16 bits whenever you need to change the state of any relay and then assert the latch bit to transfer the state from the internal registers to the output drivers.

Rich Webb Norfolk, VA

On a sunny day (Wed, 20 Oct 2010 08:11:00 -0700 (PDT)) it happened =?ISO-8859-1?Q?Pr=E9cis_d=27electronique?= wrote in :

Why not use 2 i2c I/O expanders like PCF8574? Then you only need 2 I/O pins on the micro for 16 out.

wrote in

e

Nice chip, except for the price. I need 3 chips per board. At 80 cents each, it costs more than using a bigger micro. HC595 at 30 cents each is more cost effective.

On a sunny day (Wed, 20 Oct 2010 12:06:14 -0700 (PDT)) it happened linnix wrote in :

Yes it is expensive, but you can use pins at input too. To be honest, after posting that I though: Replace it all with a PIC. I mean the PIC, if a 20 pins, can do 16 I/O, use the internal osc, 2 power pins, and 2 i2c, so one chip at maybe 2 $ or 3 $. And perhaps it can replace the original processor too :-)

am

abl=3D

r pins,

Actually, this

formatting link
is even better for me. I can use 2 chips for 18 ports and it got open- drain (no worry about shorting outputs). But using Maxim chip scares me.

Did you look into the Cortex M0 devices from NXP (LPC1100 series)? AFAIK they are pretty cheap.

Failure does not prove something is impossible, failure simply indicates you are not using the right tools... nico@nctdevpuntnl (punt=.) --------------------------------------------------------------

:

nix

te:

Rev 1 is a $5 micro.

-

This is rev 2, $3 micro + $2 I/O

Yes, they are rev 3, $3 micro + $1 (micro I/O)

Rev 4 is $3 micro + 50 cents I/O.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required