Multiple logic gates or EEPROM

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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'.

Need your opinion/advice on the following:
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

Appreciate your help !
 

Ian Rogers

Joined Dec 12, 2012
1,136
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
16,845
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?
 

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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] ?
 

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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 :) )
pcb6x8.png
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
 

danadak

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 ?

Tool is free, small board is $ 10.

Do you have a schematic yet ?


Regards, Dana.
 

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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 ?
Do you mean EEPROM that I mentioned ? :)

Almost finished the schematic (my 1st one in electronics)...the buzzer and its' logic are missing (+some minor adjustments)schematics.png
 

dl324

Joined Mar 30, 2015
16,845
Almost finished the schematic (my 1st one in electronics)
Do us, and yourself, a favor and use a schematic editor that uses functional blocks and not pin order objects. About the only thing pin order diagrams are useful for is to get an indication of routing complexity.

I'll redraw part of your schematic to show you what I mean.
 
Last edited:

dl324

Joined Mar 30, 2015
16,845
Here's a redraw of most of the upper left part of your schematic:
1587157014201.png
The region enclosed in the red lines:schematics2.jpg

It's easier to see that the anode drive circuit won't work because LS04 can't source much current.
 

danadak

Joined Mar 10, 2018
4,057
For future reference -

This can all be done in one part. But takes some coding, I estimate < 50 lines of code
for everything. Or one can, using schematic capture and/or Verilog, create 74LS parts inside
the chip to be dragged and dropped and wired up on internal chip schematic. Many of these
designs can be codeless (ones using schematic capture recreating 74LS guts out of gates, flops,
etc..).

Here is roughly what it would look like (one chip) but writing some code :

The RTC is a real time clock to handle time of day stuff. The debouncers are to handle mechanical switch
bounce issues (glitches).

1587159532401.png

As I was writing this dl324 posted a revised simpler schematic, and the 193 is in the library. The 247 can be done with the LUT in the
chip, and the 02/04 are already in library.

But it takes code, so just keep in mind as you progress what can be done these days with modern chips like PSOC.


Regards, Dana.
 
Last edited:

dl324

Joined Mar 30, 2015
16,845
Redrew the rest of the schematic. To the purists, for clarity, power connections aren't shown; decoupling capacitors are assumed.
1587187547079.png

The routing on the LS90 counters could be cleaned up a bit.

The LS04 driving the anodes should be replaced with P channel MOSFETs with pull up resistors on the gates. The multiplexer address lines weren't connected. I kept IC designators close, but there were a number of duplicates.

I know you didn't want to use an Arduino, but an Uno implementation would be relatively easy. A clone would only cost $5.
 

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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 ?
 

Thread Starter

2Hexornot2Hex

Joined Apr 16, 2020
54
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
16,845
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:
1587220757030.png
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
2,758
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
16,845
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
16,845
Since I intend to solder it manually
Here's an example of a layout I did for 4 discrete clocked R#S# flip flops:
1587232740103.png

I wanted to test the module before I made a PCB, so I handwired:
clipimage.jpg
The layout was for 4 flip flops, but the board had space so I adapted it for 6 flip flops.

Component side:
clipimage.jpg
 
Top