Selecting the right latch IC
« on: November 27, 2017, 09:39:07 AM »
Hey Guys,

I'm in a bit of a miff finding a suitable Latch IC.

The Problem:
I'm drawing a synth schematic, of which, the filter section has a series of 4066 analog switches which are used to re-configure the filter into different responses.
This part is done, coming out of the filter I just need to set 4 bits A B C D

Now, because there are a total of 8 filter sections, I would really need a lot of GPIO to keep all the filters catered for (I want to be able to control them all independently)

What I came up with so far is to use 4 x CD4508 all hanging off the same data bus and then use a 74HC138 (I know, its' the wrong symbol in the schematic) to select all the individual 4508s and clock in the bits to the filter section 4066 that way.

However, I dont think that's gonna work as I believe that only 1 chips outputs will be active at any one time, and of course, I need these to latch.
I think the 4508s go 'HI Z' so that if the output data is on a bus, only 1 chips outputs will be active at a time, which is backwards from what I want since the outs aren't busses.
I thought I could use the strobe instead of the /EN but that won't work either as the outs follow the ins when strobe is high.

In a pickle... lol

to recap, I have 8 filters, each needs 4 bits to be latched so they can be independently  set, I would like to be able to buss the data lines together to save on gpio opting to use separate enable lines.

Any suggestions?





JohnRoberts

Re: Selecting the right latch IC
« Reply #1 on: November 27, 2017, 11:02:21 AM »
Can you use a bunch of shift registers connected in series...?  push the the 32 bits of data through them then latch new data with a common enable line.

You have to push all 32 bits every time, but only the ones that changed will change with the new updates.

Should take one SPI interface so 3 lines of I/O.

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

ruffrecords

Re: Selecting the right latch IC
« Reply #2 on: November 27, 2017, 11:02:33 AM »
The CD4058 is a buffer, not a latch. At the moment you do not have a latch in your schematic. I think you want something like an LS374 from memory. Use the 374 enable pin connected to a 138 output to latch the data into the selected 374.

Cheers

Ian
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

Re: Selecting the right latch IC
« Reply #3 on: November 27, 2017, 11:18:50 AM »
The CD4058 is a buffer, not a latch. At the moment you do not have a latch in your schematic. I think you want something like an LS374 from memory. Use the 374 enable pin connected to a 138 output to latch the data into the selected 374.

Cheers

Ian

not the 4058, the 4508.
It's a dual 4 bit latch. http://pdf1.alldatasheet.com/datasheet-pdf/view/26901/TI/CD4508B.html

Still, won't work for our application though..


Re: Selecting the right latch IC
« Reply #4 on: November 27, 2017, 11:36:17 AM »
yeah something like this looks like it might be a good fit.

http://www.mouser.com/ds/2/302/74LVC_LVCH16374A-1148828.pdf


JohnRoberts

Re: Selecting the right latch IC
« Reply #5 on: November 27, 2017, 11:56:09 AM »
yeah something like this looks like it might be a good fit.

http://www.mouser.com/ds/2/302/74LVC_LVCH16374A-1148828.pdf
You are thinking parallel... think series...  4 of these puppies in series will get you 32 bits of latch with 3 lines of I/O

https://www.nxp.com/pages/8-bit-serial-in-serial-or-parallel-out-shift-register-with-output-latches-3-state-based-on-pip-74hc-hct595:74HC_T_595

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

ruffrecords

Re: Selecting the right latch IC
« Reply #6 on: November 27, 2017, 12:20:15 PM »
not the 4058, the 4508.
It's a dual 4 bit latch. http://pdf1.alldatasheet.com/datasheet-pdf/view/26901/TI/CD4508B.html

Still, won't work for our application though..

Whynot? Set output disable false and the outputs are always active. Use the strobe  from 138 to latch data.

Cheers

ian
www.customtubeconsoles.com
https://mark3vtm.blogspot.co.uk/
www.eztubemixer.blogspot.co.uk


'The only people not making mistakes are the people doing nothing'

Andy Peters

Re: Selecting the right latch IC
« Reply #7 on: November 27, 2017, 12:41:02 PM »
What I came up with so far is to use 4 x CD4508 all hanging off the same data bus and then use a 74HC138 (I know, its' the wrong symbol in the schematic) to select all the individual 4508s and clock in the bits to the filter section 4066 that way.

Any suggestions?

Why are you mixing 4000-series CMOS with 74HC parts? Do your supply rails dictate using 4000-series parts? If they're higher than 5V, then the HC parts (or whatever micro you're using) won't give you valid input logic levels. And if they're 5V, just use HC parts and don't bother with the 4000 stuff.

Yes, there are 4066 variants in the 74HC family.

I'm with JR -- use a serial-to-parallel shift register.
"On the Internet, nobody can hear you mix a band"

Re: Selecting the right latch IC
« Reply #8 on: November 27, 2017, 01:09:51 PM »
Hi Andy,
No they don't, this will all be 3.3V

Re: Selecting the right latch IC
« Reply #9 on: November 27, 2017, 01:15:51 PM »
should I really trying to be using the 74LVC series throughout?
considering all this logic is being tied to an STM32 part.


Andy Peters

Re: Selecting the right latch IC
« Reply #10 on: November 27, 2017, 05:53:28 PM »
should I really trying to be using the 74LVC series throughout?
considering all this logic is being tied to an STM32 part.

For 3.3V logic? Absolutely.

(I suppose I should say you could probably roll it all up into a small $5 Lattice FPGA.)
"On the Internet, nobody can hear you mix a band"

JohnRoberts

Re: Selecting the right latch IC
« Reply #11 on: November 27, 2017, 06:34:53 PM »
For 3.3V logic? Absolutely.

(I suppose I should say you could probably roll it all up into a small $5 Lattice FPGA.)
;D ;D ;D  I already have people on another forum complaining that my answer for everything is to use a micro.....

I dub thee Sir FPGA....  8)

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Selecting the right latch IC
« Reply #12 on: November 27, 2017, 08:14:35 PM »
haha I would love to wrap it all up into a small $5 FPGA. but I have 0 xp with that, and neither does my developer,  frankly, we're a bit scared of them.

secondly, to be honest, buying logic ics is cheaper anyway. and I have a Juki pick and place machine so I can place QFN etc easily with it.

Now, going back to the 'think serial' thing,
For code simplicity, speed, codespace, dataspace we think it's better to use parallel. sure, using serial saves you gpio, i get that.

still scratching my head looking for a part, not finding anything in my 'CMOS Cookbook' lol

JohnRoberts

Re: Selecting the right latch IC
« Reply #13 on: November 27, 2017, 08:48:21 PM »
I can't make you drink the water, but don't drown in it.

Sorry what is a cmos cookbook?

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Selecting the right latch IC
« Reply #14 on: November 27, 2017, 09:28:08 PM »
haha I'm not trying to be difficult, honest..
It's a book by Don Lancaster...

Andy Peters

Re: Selecting the right latch IC
« Reply #15 on: November 27, 2017, 10:14:36 PM »
haha I would love to wrap it all up into a small $5 FPGA. but I have 0 xp with that, and neither does my developer,  frankly, we're a bit scared of them.

Yes, be very afraid of them! They are VERY DIFFICULT and ONLY GURUS can use them!

Quote
Now, going back to the 'think serial' thing,
For code simplicity, speed, codespace, dataspace we think it's better to use parallel. sure, using serial saves you gpio, i get that.

You’re using an STM32 ARM — surely it has SPI (or USARTs which can be configured as SPI) ports? Why would there be an impact on code space? Writing to the SPI port is one instruction. Reading from the port is one instruction.  Data space? Why an impact there?

It’s actually easier than setting up a bunch of bits on the micro, especially if you can’t find eight or however-many contiguous bits in a port. As for speed, you’re controlling analog switches for a synthesizer, surely that doesn’t require blazing-fast switching?
"On the Internet, nobody can hear you mix a band"

JohnRoberts

Re: Selecting the right latch IC
« Reply #16 on: November 28, 2017, 09:59:53 AM »
haha I'm not trying to be difficult, honest..
It's a book by Don Lancaster...

I was teasing about the cookbook but thought they were mostly for analog design (i never actually read one).

Do not dismiss the suitability of using digital shift registers (like 595) for serial to parallel conversion and latch, but do what works for you, more than one way to skin a digital cat.

JR
Visit https://circularscience.com to hear what properly "cleared" drums sound like.

Re: Selecting the right latch IC
« Reply #17 on: November 28, 2017, 10:09:44 AM »
I've given up on the parallel thing.
I'm now setting about doing it with shiftys now trying to decide whether to use a 32bit spi shift register or daisy the 8 bit ones (or 16 bit ones)

:)

benb

Re: Selecting the right latch IC
« Reply #18 on: November 29, 2017, 03:44:44 PM »
I've given up on the parallel thing.
I'm now setting about doing it with shiftys now trying to decide whether to use a 32bit spi shift register or daisy the 8 bit ones (or 16 bit ones)

:)
For the 4000 series, the part you probably want is CD4094. The clock goes to all clock pins, the data pin is daisy chained, and you use the strobe pin to change the outputs when everything is shifted in. I don't know of a 74 series equivalent offhand, but surely there's something very similar. You can even bitbang a few GPIO outputs to drive them with a little programming.

Andy Peters

Re: Selecting the right latch IC
« Reply #19 on: November 30, 2017, 12:06:02 AM »
For the 4000 series, the part you probably want is CD4094. The clock goes to all clock pins, the data pin is daisy chained, and you use the strobe pin to change the outputs when everything is shifted in. I don't know of a 74 series equivalent offhand, but surely there's something very similar.

74LVC595.
"On the Internet, nobody can hear you mix a band"