EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: Dan Moos on November 22, 2017, 09:35:03 pm

Title: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 22, 2017, 09:35:03 pm
I'm doing a discrete VGA controller, and I need to be able to identify a 10 bit number (coming from cascaded 74AC163s if you care to know. A 10 input AND is what I need, but I am wondering the most efficient way to create one with common logic chips. Right now I. Figure I need three quad 2 input chips, or one dual 4 input, and single quad 2 input. Is there a clever way I'm not seeing? Must be available in through hole 74AC or HC extremely preferable.
Title: Re: Creating a ten input AND with 7400 logic
Post by: Gyro on November 22, 2017, 09:39:18 pm
I think you'd be better off using 74xx85 (4 bit) or 74xx682/684/688 (8 bit) magintude comparators.

Edit: Damn, a single 688 would give you 9 bits!
Title: Re: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 22, 2017, 10:18:52 pm
That 688 does look like a good way to go! An I understanding correctly that the way you get nine bits is to use the enable pin as one of the inputs?
Title: Re: Creating a ten input AND with 7400 logic
Post by: Gyro on November 22, 2017, 10:29:19 pm
Yes, that's right.
Title: Re: Creating a ten input AND with 7400 logic
Post by: westfw on November 22, 2017, 11:24:16 pm
74xx133 is a 13-input NAND gate...
Edit: vendors seem to think it's "obsolete"
Title: Re: Creating a ten input AND with 7400 logic
Post by: Nusa on November 22, 2017, 11:42:37 pm
74xx133 is a 13-input NAND gate...
Edit: vendors seem to think it's "obsolete"

274 in stock: https://www.mouser.com/search/ProductDetail.aspx?R=SN74ALS133N (https://www.mouser.com/search/ProductDetail.aspx?R=SN74ALS133N)
Title: Re: Creating a ten input AND with 7400 logic
Post by: thermistor-guy on November 23, 2017, 01:18:49 am
You could use a CPLD e.g. 22V10:

http://au.element14.com/microchip/atf22v10c-15pu/spld-500-gate-5v-15ns-pdip24/dp/1551770 (http://au.element14.com/microchip/atf22v10c-15pu/spld-500-gate-5v-15ns-pdip24/dp/1551770)
Title: Re: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 23, 2017, 01:56:57 am
Nusa, those are 74ALS. Everything else on the thing will be AC or HC. I'd have to check and see if they are happy together.

Another requirement is my pixel clock will be 25.175 MHz. While the AND or NANDS won't have to switch as fast as the counters, I'd still like a logic family that is reliable at those sorts of speeds.
Title: Re: Creating a ten input AND with 7400 logic
Post by: edavid on November 23, 2017, 03:02:25 am
74HC133 is obsolete, but available on eBay or from utsource.net

OP, why don't you preset your counters (or an extra set of counters), and use the carry out?
Title: Re: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 23, 2017, 03:12:01 am
I can't use the carry out because I need to identify 8 different counts in 2 different counters.

I am creating VGA timing pulses. In the the horizontal counter, I need to do things at specific points 4 times in a scan line. Same withe the vertical. I suppose I could use separate counters for each phase, but it seems more elegant to me to do it the way I've planed.
Title: Re: Creating a ten input AND with 7400 logic
Post by: westfw on November 23, 2017, 03:17:30 am
74xx30 8-input gates seem to still be jelly-beans
Title: Re: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 23, 2017, 03:34:13 am
westfw, I totally missed those in my search (think I didn't search 74HC, since AC is my preference)

The 74HC30 is what I need! That with a pair of simple 2 input gates gets me there (well, and a bunch of inverters to mask out specific numbers)

Don't know how I missed that part in retrospect.

Thanks!
Title: Re: Creating a ten input AND with 7400 logic
Post by: johnkenyon on November 23, 2017, 06:33:54 pm
westfw, I totally missed those in my search (think I didn't search 74HC, since AC is my preference)

The 74HC30 is what I need! That with a pair of simple 2 input gates gets me there (well, and a bunch of inverters to mask out specific numbers)

Don't know how I missed that part in retrospect.

Thanks!

How about using using NOR gates to combine and invert all the "active lows" before feeding into the 74HC30? (e.g. 74HC27 tri 3 input NOR gate).
Might buy you the same function with a lower chip count.

/John
Title: Re: Creating a ten input AND with 7400 logic
Post by: Dan Moos on November 23, 2017, 07:03:18 pm
That's a great idea John! This is my first project using a non trivial amount of discrete logic, so ideas like that don't yet occur to me naturally.

Just ordered Lancaster's "TTL Cookbook" and "CMOS Cookbook".
Title: Re: Creating a ten input AND with 7400 logic
Post by: amymcneil on November 25, 2017, 05:08:32 pm
If you get creative, the 74xx138 decoder/demux and the 74xx151 multiplexer can be used to replace a bunch of discrete gates when needing to pick out specific bit patterns from a multibit counter. Sometimes with a significant savings in board real estate.
Title: Re: Creating a ten input AND with 7400 logic
Post by: Gyro on November 25, 2017, 06:18:21 pm
westfw, I totally missed those in my search (think I didn't search 74HC, since AC is my preference)

The 74HC30 is what I need! That with a pair of simple 2 input gates gets me there (well, and a bunch of inverters to mask out specific numbers)

Don't know how I missed that part in retrospect.

Thanks!

That's where the magnitude comparators would come in - you wouldn't need the bunch of inverters, just set the Q inputs to match the required P pattern. It's what they were intended for anyway, address decode pattern matching.  ;)

Two comparator chips cascaded (output of one into the /OE of the other) and a single inverter if you want an active high output. Done.
Title: Re: Creating a ten input AND with 7400 logic
Post by: nctnico on November 25, 2017, 09:17:19 pm
At 25MHz I'd use the 74xx688. Any combination of gates will probably be too slow.
Title: Re: Creating a ten input AND with 7400 logic
Post by: scuzzyTerminator on November 28, 2017, 08:03:13 am
How about two 74'07s (74'03s, 74'09s ...) with a pull-up?
Title: Re: Creating a ten input AND with 7400 logic
Post by: danadak on November 28, 2017, 11:26:05 am
Or use a PSOC. Even though it has a processor you do not have
to write any code as this is static logic capability. Just drag and
drop, and wire the pins to the logic.

Or there is a comparator component also available.

See atatched.