The Aussie Pinball Arcade
Aussie Pinball Forums => Technical Matters => Pinball Training 101 => Topic started by: Marty Machine on April 20, 2009, 11:41:34 PM
-
Beginners guide to Computer Logic...
Ok, sooner or later you're going to see lots of logic 'gates' all over your pinball diagrams.
Here's a simple overview of some very basic logic gates, and how signals turn them ON & OFF.
This will help you later when fault finding if you know HOW the chip should be working.
A logic gate (or a chip full of gates) is nothing more than a bunch of tiny switches.
Let's go thru some REALLY SIMPLY analogies to get the ball rolling.
Before getting into the logic chips, let's first understand simple switching ON & OFF of a small Lamp.
Here's a 12volt battery on the left, wired via a switch, which then provides a supply voltage onto the lamp.
Currently the switch is OPEN, so the lamp is OFF (GREY colour).
(http://www.oztoytech.com/pinball/electronics/asimple_off.gif)
Now the switch is CLOSED, so the lamp is ON (YELLOW colour).
(http://www.oztoytech.com/pinball/electronics/asimple_on.gif)
At this stage, i'll refer to signals being ON or OFF, although later in the logic gates, they're called "HIGH" and "LOW".
To clarify, These are all mean the same thing :
Switch OPEN = OFF = No Voltage = Digital "LOW" or "0" (zero).
Switch CLOSED = ON = Voltage present = Digital "HIGH" or "1" (one).
Now that we can turn a lamp ON & off, lets add more switches....
By adding 2 switches inline (often termed "in series") we now need BOTH switches to be ON for the lamp to turn ON.
Switch A and Switch B are both OFF - Lamp is OFF.
(http://www.oztoytech.com/pinball/electronics/aandboff1.gif)
Switch A is ON, but Switch B is OFF - Lamp is still OFF.
(http://www.oztoytech.com/pinball/electronics/aandboff2.gif)
Switch A is OFF, but Switch B is ON - Lamp is still OFF.
(http://www.oztoytech.com/pinball/electronics/aandboff3.gif)
Finally, Switch A and Switch B are both ON - Lamp is ON.
(http://www.oztoytech.com/pinball/electronics/aandbon.gif)
What this illustrates is that you need Switch A "AND" B to be switched ON for the lamp to turn ON.
This is referred to as "ANDing" and the equivelant method is to use a chip called an "AND gate":
The "AND gate" is similar to the diagrams above, like tiny switches inside the chip, waiting to be controlled
by the 2 external switching pins (inputs).
(http://www.oztoytech.com/pinball/electronics/and_inside.gif)
If both inputs pins (A and B) are turned ON, then the ouput pin (X) will turn on, just like the lamp previously did.
Here's a real-Life example:
Your car ignition (the X output) will only turn ON when you turn on the ignition switch (input A) "AND" have the seatbelt
buckled into place (input B) - most modern cars do something like this.
(http://www.oztoytech.com/pinball/electronics/and_car.gif)
"AND gates" can have more than 2 inputs, you can join several "2 input" chips together to create an 'AND array'.
Eventually the 8 inputs all make there way thru all the gates, resulting in 1 final output pin turning OFF or ON:
(http://www.oztoytech.com/pinball/electronics/and_many.gif)
Some "AND gates" also have as many as 8 inputs in 1 chip, which is a more compact way of getting the same result as above :
(http://www.oztoytech.com/pinball/electronics/and8.gif)
This is called a "Truth Table" and shows us a sort of 'Map' (table) of what each gate will do.
(http://www.oztoytech.com/pinball/electronics/andnand_truth.gif)
We see on the left that the "AND" gate will provide a certain 'X' output, based on what is presented onto the inputs A and B.
if A is 0(off), "AND" B is 0 (off), then X(output) is also OFF.
if A is 0(off), "AND" B is 1 (on), then X(output) is also OFF.
if A is 1(on), "AND" B is 0 (off), then X(output) is also OFF.
if A is 1(on), "AND" B is 1 (on), then X(output) is also ON.
This table proves what we saw above with the 2 switches and the lamp.
Also in the table is a "NAND" gate, what the hell is a "NAND" anyway ??
Before getting into "NAND" lets first get into the "NOT gate" more popular known as "The Invertor" as it simply
"inverts" whatever passes through it.
The invertor Truth table is simple and self explanatory?
(http://www.oztoytech.com/pinball/electronics/buffnot_truth.gif)
Switch ON the input to the invertor, and the ouput turns OFF, and vica-verca:
Switch OFF the input to the invertor, and the ouput turns ON,
Also to note is the "BUFFER gate".
A Buffer provides some isolation between 2 different sections of a circuit, it basically passes whatever comes into it
straight on to the output, however, it naturally wont allow any circuitry opn the output pin to interfere with circuitry
on the input pin.
BUFFERs are used to 'drive' into several other gates at a time without loading (interfering) with the logic on the input side.
(probably getting too deep now, i'll stop).
Ok, now back to the "NAND gate" finally...
A "NAND gate" is just an "AND gate", with a "NOT gate"(invertor) added inside the chip, on it's ouput pin.
That's all.
Look at the Truth Table, you now see the "NAND" works exactly opposite to the "AND".
You can basically make ANY logic gate the exact opposite by adding a "NOT gate"(Invertor) onto the output pin.
This table shows that a "NAND" is the addition of an "AND" & a "NOT".
(also shown is a "NOR gate"...more about them shortly).
(http://www.oztoytech.com/pinball/electronics/andnand_add.gif)
Here's an example of an "AND array" now inverted to become a "NAND" function:
(http://www.oztoytech.com/pinball/electronics/nand_many_invert.gif)
Of course "NAND gates" are also have as many as 8 inputs in 1 chip.
(http://www.oztoytech.com/pinball/electronics/nand8.gif)
....and moving onto the "OR gate"...
But first, Here's a 12volt battery on the left, wired via 2 switches, which then provides
a supply voltage onto the lamp.
Currently, both switches are OPEN, so the lamp is OFF (GREY colour).
(http://www.oztoytech.com/pinball/electronics/aorboff.gif)
Now switch 'A' is CLOSED, and switch 'B' is OPEN, so the lamp is ON, (YELLOW colour).
(http://www.oztoytech.com/pinball/electronics/aorbon1.gif)
Now switch 'A' is OPEN, and switch 'B' is CLOSED, so the lamp is still ON, (YELLOW colour).
(http://www.oztoytech.com/pinball/electronics/aorbon2.gif)
Now switch 'A' is CLOSED, and switch 'B' is CLOSED, so the lamp is still ON, (YELLOW colour).
(http://www.oztoytech.com/pinball/electronics/aorbon3.gif)
What this illustrates is that you turn Switch A "OR" B ON (closed) for the lamp to turn ON.
(you could almost call this an "Either gate" where EITHER input will turn ON the lamp).
This is referred to as "ORing" and the equivelant method is to use a chip called an "OR gate":
If EITHER inputs pins (A or B) are turned ON, then the ouput pin (X) will turn on, just like the lamp previously did.
This is the "Truth Table" :
(http://www.oztoytech.com/pinball/electronics/ornor_truth.gif)
We see on the left that the 'OR' gate will provide a certain 'X' output, based on what is presented onto the inputs A and B.
Basically, if A is 0(off) and B is 0 (off), then X(output) is also OFF.
if A "OR" B is 1(on), then X(output) is also ON.
Also, if A is 1(on), and B is 1(on), then X(output) is also ON.
This table proves what we saw above with the 2 switches and the lamp.
Also in the table is a "NOR gate", and i'm sure you now know that it is an "OR" with a "NOT" fitted onto it.
Here's a real-Life example:
Your car interior light (the lamp) will only turn when you Open the Front-LEFT door "OR" the Front-Right door (or both doors).
(http://www.oztoytech.com/pinball/electronics/or_car.gif)
I tried to keep this a simple and easy as possible, hopefully the diagrams and examples in your car help understand the logic.
MM.
-
Excellent article thanks Marty!
-
Ty, techy stuff like this I like to process slowly.
*%*
-
Enjoyable read there.
Armed with all that, I'm off to build a super-computer. :lol
-
Hey, you could build a pinball with that info !*!
-
Nice work Marty, have you ever thought to maybe write a refernce book with ttl's, LS series chips as I would buy it and I am some others would too. Saves me having to waste time on the pc looking them all up and printing etc.
-
Great Post Marty Explains it nice and simple keep up the great work
-
ZEDX:
Did you mean that i write up something only for the TTL chips used mainly in pinball machines? or ALL ttl's (big job).
I like to try and keep the info as simple and easy as possible so anyone off the street would understand it.
So far, so good &&
MM.
-
ZEDX:
Did you mean that i write up something only for the TTL chips used mainly in pinball machines? or ALL ttl's (big job).
I like to try and keep the info as simple and easy as possible so anyone off the street would understand it.
So far, so good &&
MM.
the whole lot lad &&, don't need to go into vast detail as above, but a small handbook or such with IC, pinouts, function, small diagram etc. then you could branch out into rams,roms ^&( (lot of work hey)
-
But there's already books out there, like the cmos cookbook, ttl cookbook, and an array of ttl/cmos manufacturers data books for pinouts.
I usually download everything from alldatasheet.com these days as a central supply of pinout info, they seem to have every chip i try.
I am however toying with the idea of compiling a databook for pinball chips & semis (trannies etc), since there's probably less than 50 chips across ALL pinballs, it might be a handy booklet to keep in the toolbox, rather than 10 differnet refbooks
MM.
-
Ahhh yes - reminds me of the "Basic Electronics Certificate" I did all those years ago.
good stuff Marty !
-
Remember 'Talking Electronics'? Reminds me a bit of that publication.
-
Yep, it's very "TE" hehehehe, and NO, i didn't/don't work for TE <.>
-
Dad gave me his TEC-1B last year; I haven't fired it up yet but he said it was working.
-
ooooh, i was just reading up on the TEC-1 article just last week, i found the colour-covered "TE" issue that features how to build & program the TEC-1 kit, i was toying with building one up for nostalgia's sake...
A guy i was emailing about it, has already sent me the TEC-1 "bios"(for lack of a better word) rom.
What's different about the TEC-1"B"...did you have the mags/articles about any further TEC-1 info?
My TE mag with the TEC-1 feature is issue #10, not sure how much further TE went with it.
MM.
-
$#$shit,i`m starting to learn logic.ummm.do i need to???
-
hahaha only if you *NEED TO* :lol
-
When are you starting on the READING SCHEMATICS FOR DUMMIES !@#
-
Millsy:
To get me started, is there anything particular you don't understand on schematics?
I posted a small piece in here about "wiring diagrams" to clear up wiring issues some people had, other than that i'm not sure what/which things to tackle next.
Always looking for users to ask what they're struggling with, then i can create some info based on that....
MM.
-
Being an old motor mechanic - found reading wiring diagrams in auto applications easier as there was a + & - and only used a test light (only started using multimeter since working on the pins) as well the wiring colours in the auto stood out like dogs b....(cant rely on reading the colours in ems as they all look the same to me - Im a bit colour blind) - I feel more comfortable using continuity checking but I miss that main black earth wire.
This probably doesnt make sense as Im no electrician.Need to spend more time reading and working on schematics. *!@
-
Wow Marty reading this tutorial took me back to the days when Dick Smith was selling heated toilet seats - anyone remember those?
I usually download everything from alldatasheet.com these days as a central supply of pinout info, they seem to have every chip i try. I am however toying with the idea of compiling a databook for pinball chips & semis (trannies etc), since there's probably less than 50 chips across ALL pinballs, it might be a handy booklet to keep in the toolbox, rather than 10 differnet refbooks
MM.
What a great idea!! #*#
[attachment deleted by admin]
-
Something about "Toilet seat + 240v mains + Water " makes me nervous......
-
You should look over the page, it's right "up there" with the Solar Cooker :lol :lol :lol :lol
-
Ha ha ha, you're absolutely right!! With $6 nationwide freight they must have been flying out the door :D
[attachment deleted by admin]
-
I wonder how many people got sunburnt while turning their eggs or flipping a steak, and wondering "why is it so hot here" :lol
-
Something about "Toilet seat + 240v mains + Water " makes me nervous......
Nah, all good - guaranteed unbreakable for 'normal' usage.
-
I built a tec 1 b in yr12 electronics back in 1987 still think i have it sitting in an old box up stairs lol.
-
Hey, you could build a pinball with that info !*!
I did exactly that, using pretty much the same info and LOTS of CMOS logic ICs... about 14 yrs ago, theres a thread on here somewhere for that game :D
-
I built a tec 1 b in yr12 electronics back in 1987 still think i have it sitting in an old box up stairs lol.
Got my dad's one sitting out in the shed - will have to fire it up again one day!
-
(http://aussiepinball.com/index.php?action=dlattach;topic=1305.0;attach=4752;image)
Don't laugh, we might all be cooking on these soon with electricity prices shooting skyward :lol
-
I have TE issues 10,11,12,13,14 & 15 - 15 I think was the last, after that Colin Mitchell produced specific books such as "FM Bugs", "Mini Frequency Counter" and "Security Devices" etc.
If you want any of those issues Marty let me know (some I have doubles of for some reason?).
ooooh, i was just reading up on the TEC-1 article just last week, i found the colour-covered "TE" issue that features how to build & program the TEC-1 kit, i was toying with building one up for nostalgia's sake...
A guy i was emailing about it, has already sent me the TEC-1 "bios"(for lack of a better word) rom.
What's different about the TEC-1"B"...did you have the mags/articles about any further TEC-1 info?
My TE mag with the TEC-1 feature is issue #10, not sure how much further TE went with it.
MM.
-
I have TE issues 10,11,12,13,14 & 15 - 15 I think was the last, after that Colin Mitchell produced specific books such as "FM Bugs", "Mini Frequency Counter" and "Security Devices" etc.
If you want any of those issues Marty let me know (some I have doubles of for some reason?).
ooooh, i was just reading up on the TEC-1 article just last week, i found the colour-covered "TE" issue that features how to build & program the TEC-1 kit, i was toying with building one up for nostalgia's sake...
A guy i was emailing about it, has already sent me the TEC-1 "bios"(for lack of a better word) rom.
What's different about the TEC-1"B"...did you have the mags/articles about any further TEC-1 info?
My TE mag with the TEC-1 feature is issue #10, not sure how much further TE went with it.
MM.
My Dad handed over a bunch of TE's - I will have to check what I have as well but I can't get into the shed at the moment.
-
I have TE issues 10,11,12,13,14 & 15 - 15 I think was the last, after that Colin Mitchell produced specific books such as "FM Bugs", "Mini Frequency Counter" and "Security Devices" etc.
If you want any of those issues Marty let me know (some I have doubles of for some reason?).
Thanx for the offer mate, but since my old post, i've aquired the entire TE collection from various sources.....
Here's a link to my ongoing "Electronics Magazines" collection project.....
http://www.retro-riders.com/tech/magz/ (http://www.retro-riders.com/tech/magz/)
MM.
-
WOW - that is a serious collection!!!!
-
I have TE issues 10,11,12,13,14 & 15 - 15 I think was the last, after that Colin Mitchell produced specific books such as "FM Bugs", "Mini Frequency Counter" and "Security Devices" etc.
If you want any of those issues Marty let me know (some I have doubles of for some reason?).
Thanx for the offer mate, but since my old post, i've aquired the entire TE collection from various sources.....
Here's a link to my ongoing "Electronics Magazines" collection project.....
http://www.retro-riders.com/tech/magz/ (http://www.retro-riders.com/tech/magz/)
MM.
Excellent! I have been collecting magazines from the VZ era to complement my VZ collection; it is not quite complete so I may eventually bother you for some scans!
-
No probs at all....
The site is being re-done as we type, as i've expanded the mags into their own areas, with covers and indexes of contents etc...
Enjoy!
MM.
-
Could we please get those pictures back up pertaining to the first post if possible.
They are no longer showing up.