Author Topic: Help with IC logic gate chips  (Read 421 times)

bacteria

  • Jr. Member
  • **
  • Posts: 90
Help with IC logic gate chips
« on: December 02, 2010, 10:57:48 AM »
Bought a couple of logic gate IC chips, one is the 74HC08 chip

I actually want to use an AND and also an XOR chip to decide which of two connections to connect a circuit to (the Intellivision matrix). The principle however I also want to use for my TurboGrafx too when do it for this system.

On the AND I know the logic is "If A1 AND B1 are on, then Y1 is on, otherwise off".

Here is a datasheet, there are one or two others around: http://www.datasheetcatalog.com/datashe ... HC08.shtml

For testing purposes, as I expect the circuit to be "on" or "off", I wanted to connect an LED into the output (added a 75ohm resistor to protect the LED) so when I press two buttons the LED illuminates. Can't make it work.

As some of you guys have used IC chips to select region switching, thought you might know how to do this?

Connected 5v to the VCC line and ground to the grounding pin. Couldn't work out how to connect button contacts to the circuit so the LED comes on when both buttons are pressed. If I can do this, I can remove the LED and replace with what I need.

Help?

Charlie

  • Full Member
  • ***
  • Posts: 247
Re: Help with IC logic gate chips
« Reply #1 on: December 03, 2010, 09:41:26 AM »
1. 75 ohms is a bit low, you may pull too much current....more than the IC can handle; you need to be, at a min, 220 ohms.  470 ohms would be better.
2. Based on your statement "when I press two buttons", you need to connect one side of each button to the 5V source, and the other side of the switch to each of the AND inputs.  You will also need to add some pull down resistors to ground on those inputs.  This will guarantee that the inputs are low/zero when the buttons are not pressed, and high/one when the button is pressed.  Because this is a AND gate, both buttons must be pressed to get the output to go high.  To turn on the LED under this conditon, the LED must be connected to the output (observe polarity!), and then through the resistor to ground.

However,  you must realize that the LED will only illuminate when both buttons are pressed...release one (or both) and it will go out...it will NOT remain lit.

This begs the question...why are you thinking of using an XOR?  You don't need it to obtain the above effect.


Charlie


bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #2 on: December 03, 2010, 10:53:28 AM »
Thanks for the guidance Charlie, i'll give it a go - only using LED's until I have got used to the logic chip, then i'll use it for what I intend - my real application is using an Intellivision console, I worked out the matrix on the controller as while back; press up or right and you get normal button action plus ground; press up AND right at the same time it doesn't use ground it uses a different connection. I therefore need an AND logic gate for if both buttons are pressed at the same time to use the other connector instead of ground; and an XOR so that if it isn't an AND logic then it will use ground instead.

If I just use an AND gate then that will only serve one function, I need XOR so if one button only is pressed then i'll get connection to the other one.

bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #3 on: December 03, 2010, 11:53:31 AM »
Thanks so very much, got my AND logic gate working now!

I'm going to upload a video on this in due course as part of my online guides, to hopefully help others, when i've got it all working.

bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #4 on: December 03, 2010, 09:48:13 PM »
Just realised something - need help again!

What I actually want is if button 1 is pressed AND button 2 is pressed, then output ground via Y1; and on the XOR chip I need it to say if button 1 is pressed or button 2 is pressed but not both at the same time output a different data line via 1Y

From what I understand, the schematics for the above outputs voltage if two buttons are pressed at the same time on AND; not "use this connection instead".

What I really need is "if button 1 is pressed (1A) and button 2 are pressed (2A) at the same time, then take line data input from Z and output to 1Y

Ideas please? If this is the wrong chip for what I want, what do I need please?

Charlie

  • Full Member
  • ***
  • Posts: 247
Re: Help with IC logic gate chips
« Reply #5 on: December 04, 2010, 12:36:07 AM »
When I first responded to your original post, my first statement was "you are not describing what you want very well".  But I took that out as being not very politically correct, and went with my best interpretation of what you meant.  Obviously, that worked for you, but, then again, that was a simple circuit.

However, I now need to really say that.  You are not describing what you want very well.  What is "Y1", the name of the connection on one of the pins on one of the chips?  What then is "1Y"?  What is "Z"?

Try this:
1.What should happen if you press one button?  What output should activate?  What should it do?
2. What should happen if you press the other button?  What output should activate?  What should it do?
3. What should happen if you press both buttons?  What output should activate?  What should it do?
4. What should happen if no buttons are pressed?  What output should activate?  What should it do?

Obviously, the answer to "What should it do" wil be either "it will go high" or "it will go low"

Charlie

bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #6 on: December 04, 2010, 05:45:21 AM »
You are right Charlie, the reason I wasn't clear is I had conflicting information in my mind so it didn't help me to be clear in my posting.

I thought that "What I really need is "if button 1 is pressed (1A) and button 2 are pressed (2A) at the same time, then take line data input from Z and output to 1Y" was fairly clear.

On reflection i'm not sure if I can do what I want to do, as these logic chips require voltage and
I need it without. I think the only solution to what i'm trying to do is via mechanical means by building my own mini joystick.



Charlie

  • Full Member
  • ***
  • Posts: 247
Re: Help with IC logic gate chips
« Reply #7 on: December 04, 2010, 06:37:38 AM »
Well, that's part of the point I was trying to make.  As soon as you said "Z", to me that triggered "data, not logic" (but your description was otherwise) and the thought that you wanted a signal from input #1 to go to the output when a certain combination of buttons is pressed, or a signal from input #2 to go to that same output when a different combination of buttons is pressed (or maybe the buttons are simply NOT pressed at all).  Either way, if you are trying to route data, you need to determine if the data is analog or digital.  Digital data CAN be routed using AND and/or OR gates (hey, I made a joke!), but analog data cannot --- you need a different kind of chip.

Charlie

bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #8 on: December 04, 2010, 10:35:55 AM »
Ok, presumably must be digital data as it's a button press not a potentiometer like on a joystick; either the data is on (button pressed) or not (button not pressed). So, how would I please route digital data using AND and also XOR chips?

I made a diagram to hopefully help describe what i'm having trouble communicating! lol


TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Help with IC logic gate chips
« Reply #9 on: December 04, 2010, 10:58:30 AM »
Why a different pair than signal + ground? Everything is gonna have to go to ground anyway at some point....
Looks like a de-multiplexer to me ....

bacteria

  • Jr. Member
  • **
  • Posts: 90
Re: Help with IC logic gate chips
« Reply #10 on: December 04, 2010, 11:07:39 AM »
Simple and unusual reason - the Intellivision uses a matrix like a computer keyboard does for working out what button is pressed and relaying it back to the console. The d-pad on the Intellivision is 16 way rather than 8 way as normal, the way it does this is to use a ground for some of the directions and a different data line (not ground) for the others. yes, it's unusual, but i'm trying to find a solution, ie above!