# Help with IC logic gate chips

Discussion in 'General Electronics Discussion' started by bacteria, Dec 2, 2010.

1. ### ljcox

49
0
Jul 10, 2010
Here is a suggestion.

I think this is the logic that you need.

I have also attached a paper that I wrote some years ago that may help you understand the duality of logic gates.

#### Attached Files:

File size:
7.8 KB
Views:
1,217
• ###### Suggestions.jpg
File size:
70.7 KB
Views:
1,340
Last edited: Dec 9, 2010
2. ### ljcox

49
0
Jul 10, 2010
I meant to add this attachment to my previous post.

File size:
45.9 KB
Views:
171
3. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,411
2,779
Jan 21, 2010
I hope it assists him.

I find that inverted logic is a great way to confuse people, especially when you start using schematic diagrams totally different to what is shown on the manufacturer's datasheet.

But, it might just click with him

4. ### ljcox

49
0
Jul 10, 2010
Yes, I agree it is confusing for novices. However the concept is very powerful.

When I first learnt the technique, I was able to reduce the number of ICs in a circuit designed by someone else from 12 to 4.

He employed only NAND gates & inverters whereas I used NAND gates & NOR gates and no inverters.

The process I follow is roughly as follows:-

Write down the Boolean expressions.

Draw the logic using AND gates, OR gates and inverters as in option one above.

Decide which inputs and outputs are to be active high and active low (sometimes you have a choice, sometimes you don't).

Decide upon the most efficient realisation, i.e. the minimum cost solution.

Re-draw the circuit as I did in option 2 above.

5. ### bacteria

24
0
Dec 2, 2010
Thanks for the information, useful.

Problem I have is this - I have two applications and neither seem to be suitable - if i'm wrong i'd love to know it and be put right!

1) the application I referred to in this thread relies on only two inputs - ground and the button press. I can't pass through positive voltage through this combination as it would make a short!

2) the other application I have will be for the controller wires in the cables - i'm going to have lots of consoles attached to one controller input, each console has grounding isolated however that leaves 8 wire contacts that will hold the data for each console going into the same master controller. I might be able to use diodes for most of them, however might need to use logic to toggle inputs to outputs, which might need PICAXE or similar. BTW, someone else mentioned Arduino - which one is better for an application that needs easy programming, easy transfer, stable hardware; lots of inputs and outputs and simple logic of "if switch is on, take input A to output X and input B to output Y", etc?

Nice forum BTW, helpful guys - thanks!

6. ### ljcox

49
0
Jul 10, 2010
I don't understand your point 1.

I found your flow chart of some value, but either a truth table or a diagram would more useful.

The same applies to point 2.

I clicked on the links to your web site, but I don't have the time to wade through it all.

As far as I can gather, all you need is a simple switching circuit, but I don't know anything about games consoles, so I need you to fill in the detail of what you need.

A picture is worth a thousand words.

I have to go out soon and won't be back for at least 8 hours. So I'll tune it again either this evening or tomorrow.

Last edited: Dec 9, 2010
7. ### bacteria

24
0
Dec 2, 2010
My worklogs are comprehensive as I like to share my modding knowledge to all, i'm a believer in sharing knowledge rather than keeping it to myself (which is a reason why my forum is quite popular); however yes, this means lots of posts on my threads.

I'm resolving the issues with the original query with a manual 8 way digital button press d-pad i've made myself, which will do the job easily. It is simple and will work, also nearly zero cost.

The thing that might well be of interest, as per point 2, is a series of logic chips. To explain ljcox, in a games console controller, there are anything between 3 and 9 wires inside the shielded cable, which send data to and fro between itself and the console system; so the console knows if a joystick has moved, a button pressed, etc. In some systems they are just contacts, in others they go through quite a bit of electronics. I'm making a single base unit which includes around 19 original hardware console systems, and most of these use proprietary and incompatible controllers (handheld controllers is what I mean by "controllers", ie the gaming pad), so i've made a one-for-all master controller for all the systems by keeping the electronics in the controller into a plug-in cartridge which is interchangeable depending on what you are wanting to play. This also means that all the console wires are connected into the same port linking to the master controller; the various data lines. No issue isolating ground, i'm doing that anyway, so that takes away one of the 9 lines as all controllers have a grounding wire, so using one connector for all. The issue is the other 8 - if they conflict, i'll need logic chips that take the outputs from a series of connections depending what the logic is; in other words, if you have outputs 1-9, I could use 9 IC chips, with one output which decides which of the 20 inputs to use based on logic (ie 20 manual SP2T switches, one per console system); that way, i'll get one output per chip = the 9 outputs in total to the 9 controller connections.

This is what I may need to use, so the question is what would be best for that? PICAXE and Arduino have been mentioned, no idea if these are the best and if they are which is preferable and why; or a better alternative.

8. ### ljcox

49
0
Jul 10, 2010
I need more detail re the part in red.

It may be possible to do the switching with the 20 SPDT (or DPDT) switches.

I don't believe that you need a PIC or PICAXE. I don't know what a Arduino is, but doubt if you need it either.

It seems to be a simple switching arrangement using either SPDT switches, an IC MUX or relays.

As I said previously, a diagram would help me.

Are the signals to be switched just simple on/off button signals or are they analogue signals?

9. ### bacteria

24
0
Dec 2, 2010
20 manual switches, one per console system, to turn system on or off.
9 inputs per console (the controller cable with up to 9 wires inside)
= 180 inputs (20 x 9)
ie 9 chips each with one output and 20 inputs; each chip will output one signal from the choice of 20; depending on which console system is turned on (for example, if using say a SNES, then all input pin "1" are on, the other 19 are off; if using say DreamCast, then input pin "12" is on, the other 19 are off.

10. ### bacteria

24
0
Dec 2, 2010
Guy on the Intellivision forum pointed me to this:

http://web.archive.org/web/20060317145051/users.erols.com/tiltonj/games/tech/intvsticky.html

According to the diagram, doesn't use the 5v and resistor (for the directional control, ie d-pad), just the button contacts, which is what I wanted. Will it work ok and reliably like this with the 74HC08 AND chips? Probably will continue with my manual d-pad method, however if this circuit will work without voltage and just off the button presses, might be worth trying out of interest.

11. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,411
2,779
Jan 21, 2010
OK, you're now specifying TTL logic. In reality you'd use LS-TTL (74LS00 instead of 7400) because it's not obsolete (but still pretty long in the tooth).

When you gave a datasheet previously, you specified an HC series part, which is CMOS and has a totally different set of input and output specifications.

The major difference (from the point of view of what we have been discussing) is that TTL (and LS-TTL) inputs float to a weak high level if left disconnected. CMOS does not do this, and requires the inputs to be held either high or low, and not left floating.

There are lots of other differences between CMOS and TTL, but suffice to say, they are not interchangeable with each other in most (or at least many) cases.

12. ### bacteria

24
0
Dec 2, 2010
This is like anything else, we are all geeks on some subjects and know nothing about others; i'm geeky on what I do and you guys here are geeky on electronics, which is why I came for help as my electronics knowledge is very poor. What I was hoping for was "ah, you need this and that and this is how you connect it"; now we're referring to TTL logic rather than CMOS neither of which means anything to me. As referred before, the logic i'm after is "if button A is pressed and B is also pressed then use X in addition to the existing ground otherwise don't" type.

My other application is also taking data lines and deciding which one goes through. I could probably do this with diodes. To stop the data lines being two way instead of one way on the Intellivision matrix, I used Zener diodes which worked fine; if you add a second Zener diode will it make the signal too weak?

On another question, is there a diode around that doesn't degrade or weaken a signal or reduce voltage; just makes a signal travel one way not two and keep the signal intact? If there is, what is it please; if not, what is the one with the less loss? Only talking about a small DC voltage as data lines.

13. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,411
2,779
Jan 21, 2010

With respect to the ground connection, what are the voltages on both sides of the switches, with the buttons pressed and released.

If they are all the same -- great. If not, report all the different values (anything within about 0.2 volts is OK to accept as "the same".

edit: I want something like this:

one side is always 0V (and all buttons have one side like this) and it doesn't matter if they are pressed or not.
The other side is 4.9 volts with the button open and 0V with it closed, all buttons are the same

You might NOT get those results. The results you get will tell us something about what logic family is appropriate.

Last edited: Dec 11, 2010
14. ### ljcox

49
0
Jul 10, 2010
With regard to the red, I think you mean:- one input & 20 outputs.

That I how I interpreted your description. I have attached a block diagram of what I think you want.

Do you agree?

File size:
44.8 KB
Views:
129
15. ### ljcox

49
0
Jul 10, 2010
1. I object to the word "geek". Everyone has their own interests & skills. Eg, my wife likes gardening, so does that make her a "gardening geek"?

2. TTL = Transistor Transistor Logic. CMOS = Complementry MOS. A MOS FET is type of transistor and can be constructed as either an N channel or a P channel. CMOS ICs contain both types hence it is called "complementry" since the P & N channel FETs are complementry. Bipolar transistors come in 2 versions also; NPN & PNP. These are also complementry.

3. I would not use Zener diodes. I would use normal diodes. When you answer my previous post, I'll consider whether diodes can be used in lieu of the IC buffers A1 ~ A20.

But first, as I said in that post, I need you to confirm whether I'm on the right track. ie. is my drawing basically what you want?

16. ### ljcox

49
0
Jul 10, 2010
I agree with Steve. The CMOS gates will need pull up (or pull down) resistors as they must not be left floating.

17. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,411
2,779
Jan 21, 2010
Don't object to the word "Geek". Revel in it!

The problem is akin to bacteria exercising his entire knowledge of the Chinese language by saying hello to a person in Mandarin, and then getting upset that he does not understand the reply.

A few wo bu dong's would be more productive.

Ni dong bacteria ma?

18. ### bacteria

24
0
Dec 2, 2010
lol

"Geek" is a compliment in this context ljcox, "nerd" isn't; to quote Wikipedia:

I am knowledgeable about a lot of things but have little knowledge about other things, this is one thing, electronics, that i'm picking up part knowledge but weak in the subject, hence thought a Google translate would be "ah, you need X and Y and here's how to connect it to what", as my applications are quite specific. Hey, people come to me for help on lots of things to do with modding, as you can see on my forum; and I give them clear replies with links to what they need (so I do practice what I preach!)

(*steve*) - if my extra diodes don't work in what i'm trying (I have about 4 types of diodes in my boxes) i'll look at the voltages as you requested - I know of course one side will be 0 volts as it's ground. If what I use, in my usual cavalier methods, works, job done is my view!

I do like this forum from what I see of it so far, nice to have a bit of banter - BTW, I don't get upset, i'm too old in the tooth for that; i'm quite light hearted in many ways.

19. ### ljcox

49
0
Jul 10, 2010
You did not comment on the block diagram that I posted yesterday.

I'm happy to design the circuit for you, but I need to know what to design.

I drew the block diagram to illustrate my interpretation of your description. If this is what you want, then I'll do the design for you.

If not, then tell me where it is wrong so I can modify it.

20. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,411
2,779
Jan 21, 2010
We have to make an assessment of everyone's skill and knowledge as they ask their question. It's not easy to do and we often get it wrong.

Your first couple of posts seemed to indicate that you had more knowledge than you really do.

No problems, we can still help. We'll go slower

Do the measurements I asked you for. We need to know the voltages so we can ensure you have the right logic family. It's like looking at the exhaust of a car to determine whether to fill it with gas, petrol, or diesel. The wrong logic family, like the wrong type of fuel, will cause problems later on.