# Multiple logic gates or EEPROM

#### 2Hexornot2Hex

Joined Apr 16, 2020
48
Hi gurus,

I'm designing a special timer that should buzz depending on its' current operating mode and the displayed time.
The circuit is planned to function on 'pure' electronics - I mean, without Arduino.
555 timer is used as pulse generator and a bunch of TTL ICs are used (counters,multiplexers,decoders,AND/NOR/NOT gates...)

The buzzer should sound when:
11 digits/bits are all LOW(0) and [4 other bits at one of 4 specific combinations]

To program this logic, I can use logic gates (that I currently have) - but it will add more 7 ICs [14 pins each - 'quad 2-input' NOR & AND gates].
The circuit already contains 15 ICs, so I'm not so excited adding 7 more just for the buzzer '1'.

1. Would it be better to use for the buzzer logic an EEPROM IC ?
For example: 28C16 EEPROM 16K (2Kx8) - 11 Address/8outputs [datasheet]
it would take less space on a board and is much simpler to wire.

2. what approach would you choose/advice for the buzzer logic ?
maybe other alternatives also exist that I'm not aware of

#### Ian Rogers

Joined Dec 12, 2012
916
For small stuff like this, I use the small 18 pin GAL's from Atmel ( now Microchip) These are even smaller than an eeprom and can do so much more... No different than programming an eeprom..

#### dl324

Joined Mar 30, 2015
13,095
Welcome to AAC!

What is your limit for additional ICs? How would the 7 you mentioned be wired to decode the buzzer activation?

Could you post a table with the bit settings that should sound the buzzer?

#### ElectricSpidey

Joined Dec 2, 2017
1,797
My only advice would be to choose a larger EEPROM with at least 15 addresses, as to accommodate the 11 lows and the additional 4 combos.

#### MrChips

Joined Oct 2, 2009
24,178
You can reduce your chip count if you are allowed to use diode logic.

#### 2Hexornot2Hex

Joined Apr 16, 2020
48
For small stuff like this, I use the small 18 pin GAL's from Atmel ( now Microchip) These are even smaller than an eeprom and can do so much more... No different than programming an eeprom..
Can you write the exact one you mean ?
Is it some kind of the following GAL16V8 (has 20pins) [ebay] ?

#### Ian Rogers

Joined Dec 12, 2012
916
Yep!! That's what I said...20 pins ( sorry, I haven't programmed one for ages... Its the gal16v8 I use..

#### 2Hexornot2Hex

Joined Apr 16, 2020
48
Welcome to AAC!

What is your limit for additional ICs? How would the 7 you mentioned be wired to decode the buzzer activation?

Could you post a table with the bit settings that should sound the buzzer?
Tried to figure out what do you mean by 'AAC' .....something with 'alternating current' - than it hit me ‍
Thanks

I don't have something that actually limits me. I intend to solder the project on 6X8mm PCBs and to put in a small box (15 ICs already will challenge me )

Buzz when:
(total 15 bits)
bit abit bbit cbit dI coded through ICs
0010(a NOR b) AND c AND ('0' NOR d)
0011(a NOR b) AND c AND d
1100a AND b AND (c NOR d)
1111a AND b AND c AND d
AND 11 other bits are all '0's

(I have NOR, AND ICs (2 input per gate) and also NOT ICs)
'On-paper' I managed to produce '1'/'0' buzz output with 12 NORs and 17 ANDs

Joined Mar 10, 2018
4,057
How about a part that you drag and drop the gates and muxes and flops you need onto a schematic,, wire them up,
program part with a low cost board, and you are done ? All in one chip ?

#### 2Hexornot2Hex

Joined Apr 16, 2020
48
I drew a rough block diagram on a paper. Since I intend to solder it manually, I preferred the actual IC pinouts, to figure out how to place the components on the board.
But for sure, your diagram is much clearer and understandable.

circuit won't work because LS04 can't source much current
....
The LS04 driving the anodes should be replaced with P channel MOSFETs with pull up resistors on the gates.
OMG...you're right. That was really lame
I'll check the MOSFET alternative you wrote.

I know you didn't want to use an Arduino, but an Uno implementation would be relatively easy. A clone would only cost \$5.
I wanted to avoid Arduino, as it would end up a programming 'challenge' (logic is not complicated at all) instead of an electronics (I already have UNO - haven't used it yet) .... I want to be exposed and understand the basic electronics and the approaches (transistors, caps, pull up/down resistors...)

... decoupling capacitors are assumed.
(decoupling caps are for switches I assume) Are they actually needed ?

#### 2Hexornot2Hex

Joined Apr 16, 2020
48
You can reduce your chip count if you are allowed to use diode logic.
Mr Chips, diod logic - that's a great lead !
I wasn't aware of this approach at all. Reading it with fascination !
(of course it won't solve all the issues)
I'll also further check this subject.

#### dl324

Joined Mar 30, 2015
13,095
Since I intend to solder it manually, I preferred the actual IC pinouts, to figure out how to place the components on the board.
Before you start wiring, you should make sure you've traced the logic in your head several times to make sure it will work; that's why a readable schematic is more important than one using pin order. Then it would be advisable to breadboard, or simulate, the circuit to make sure you find any mistakes before soldering anything.

Any decent schematic editor will let you design a layout. I recommend this even though you're going to hand wire. This will allow you to work on an optimal placement that minimizes wire congestion (by using the fly wires to minimize routing congestion). I've actually used board layouts to connect things with bare wire.

When I do a board layout I always do revisions to tweak component placement before making the first board.
I'll check the MOSFET alternative you wrote.
Something like this:

The MOSFET is supposed to have a continuous drain current of several amps. It's a logic level device and will turn on "hard" with TTL.
I wanted to avoid Arduino, as it would end up a programming 'challenge'
Solving a problem with a program is quite similar to designing in hardware. But, logic in a program is more convenient to tweak. It's fine if you want to put restrictions on the solution space, but the more tools you have in your tool box, the more efficient you'll be.
(decoupling caps are for switches I assume) Are they actually needed ?
Unless you're a gluten for pain, you should learn from the experts. The brute force approach is to put a decoupling cap on each power pin. You can often get away with fewer; sometimes you require more.

#### ElectricSpidey

Joined Dec 2, 2017
1,797
If programming is the reason you want to avoid a micro, then a PSoC is just what you need, you can layout the needed logic on the IDE schematic and avoid any coding. (unlike the above example)

The PSoC has all of the logic components you need, you just drag, drop and wire them, select the inputs and outputs...build and program. The IDE is free.

But, I still like the EEPROM solution, you can build a simple manual programmer if you don't have any other way to program.

#### dl324

Joined Mar 30, 2015
13,095
It just occurred to me that you can eliminate the 74LS02 if you use the freed up inverters and the unused AND gate.

#### dl324

Joined Mar 30, 2015
13,095
Since I intend to solder it manually
Here's an example of a layout I did for 4 discrete clocked R#S# flip flops:

I wanted to test the module before I made a PCB, so I handwired:

The layout was for 4 flip flops, but the board had space so I adapted it for 6 flip flops.

Component side: