EEVblog Electronics Community Forum
Electronics => Microcontrollers => Topic started 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.
-
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!
-
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?
-
Yes, that's right.
-
74xx133 is a 13-input NAND gate...
Edit: vendors seem to think it's "obsolete"
-
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)
-
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)
-
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.
-
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?
-
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.
-
74xx30 8-input gates seem to still be jelly-beans
-
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!
-
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
-
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".
-
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.
-
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.
-
At 25MHz I'd use the 74xx688. Any combination of gates will probably be too slow.
-
How about two 74'07s (74'03s, 74'09s ...) with a pull-up?
-
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.