Can I do this on a breadboard?

Anything that doesn't fit anywhere else below.

Moderators: kiore, Blip, The_Metatron

Can I do this on a breadboard?

#1  Postby Cory Duchesne » Mar 25, 2010 10:33 am

Hello,

I've been trying to understand CPU's/microprocessors lately, and I realized today that I want to explore building circuits with breadboards. But what I want is to somehow setup a very, very simple keypad to the breadboard, with keys 0 to 9, like you see on a calculator. And then I want a 7 segment led display, so that whatever number I press, shows up on the display. And of course I would have to build whatever circuits are required to display one of the 10 numbers I have in mind.

I don't want to do anything beyond displaying numbers. No arithmetic, I don't want to make a clock, nothing like that.

Just a keypad, and the ability to use that keypad to display numbers 0 to 9.

I've typed into google every possible keyword I could think of in search of hobby kits for this kind of thing, but all I come up with are projects that are much more complicated than I want to do.

So....can any of you help me with this? Any advice?
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#2  Postby Calilasseia » Mar 26, 2010 1:03 am

Cory Duchesne wrote:Hello,

I've been trying to understand CPU's/microprocessors lately, and I realized today that I want to explore building circuits with breadboards. But what I want is to somehow setup a very, very simple keypad to the breadboard, with keys 0 to 9, like you see on a calculator. And then I want a 7 segment led display, so that whatever number I press, shows up on the display. And of course I would have to build whatever circuits are required to display one of the 10 numbers I have in mind.

I don't want to do anything beyond displaying numbers. No arithmetic, I don't want to make a clock, nothing like that.

Just a keypad, and the ability to use that keypad to display numbers 0 to 9.

I've typed into google every possible keyword I could think of in search of hobby kits for this kind of thing, but all I come up with are projects that are much more complicated than I want to do.

So....can any of you help me with this? Any advice?


Oh, this was the sort of thing that magazines such as Practical Electronics here in the UK covered back in the 1970s. It'll probably be a bit difficult to obtain back numbers of old electronics mags, so I did a bit of scouting around, and I think your best bet, if the web page doesn't crash your browser (whatever you do, don't try visiting this site via a Google images link, because if you do, it'll kill your browser, but it works fine if you visit the site directly), will be this page. That site covers the basics of circuitry right the way from "battery plus two wires and a bulb" if need be, but goes on to more advanced stuff as well.

Note: if you want to find out how the actual driver IC circuit in that experiment works, that's likely to be an interesting topic in its own right. This page might prove interesting here. :)
Signature temporarily on hold until I can find a reliable image host ...
User avatar
Calilasseia
RS Donator
 
Posts: 22631
Age: 62
Male

Country: England
United Kingdom (uk)
Print view this post

Re: Can I do this on a breadboard?

#3  Postby Cory Duchesne » Mar 26, 2010 2:39 am

Alright, Calilasseia, thanks! You're right, I'm more interested in building the driver circuit, because I want to actually engineer the cpu. A lot of people might say I'm crazy for wanting to do this, but if you think about it, all I want is a 7 segment LED that displays 0 to 9 through a simple keypad. It won't be easy, but surely it's attainable to the average person if they really want it.

I don't want to use any pre-engineered chips, because it seems to me as if that would mask the very understanding I seek.

While I have you, can I ask you something...

Is the very act of engineering the logic gates of a Cpu, Machine coding? Is that what machine coding is? Engineering the circuits of a cpu?
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#4  Postby Tyrannical » Mar 26, 2010 4:20 am

http://www.ramseyelectronics.com/

You probably want to buy one of those hobby kits.
Good fences make good neighbors
User avatar
Tyrannical
Banned Troll
 
Posts: 6708
Male

United States (us)
Print view this post

Re: Can I do this on a breadboard?

#5  Postby pcCoder » Mar 26, 2010 5:59 am

If you don't want to use a pre-engineered chips (7 segment driver) it may take a full-size breadboard. It seems to me that a basic driver can be made to just inputs to outputs, a bus (A, B, C, D inputs) would run through a series of gates that would be wired in such a way to produce a high output based on the input. This is a small schematic I drew up. Not perfect at all for certain, but a basic initial idea of what I think would be needed. Also this doesn't include other of functions that a 7 segment driver chip would include, such as a latch to hold the same output regardless of input, enable line to enable/disable the 7 segment LED, etc.

Image
pcCoder
 
Posts: 650
Age: 41
Male

United States (us)
Print view this post

Re: Can I do this on a breadboard?

#6  Postby goonerism_speek » Mar 26, 2010 12:36 pm

Cory Duchesne wrote:... I'm more interested in building the driver circuit, because I want to actually engineer the cpu.


This is not really something you'd ever do on the silicon of a cpu, you'd do it with a abstract mathematical algorithm. You say you want to understand the circuitry of the cpu, and not get involved in the maths, but the maths is pretty much all the cpu does. Well, that and i/o. Sounds more like you're just interested in general digital electronics.

Cory Duchesne wrote:Is the very act of engineering the logic gates of a Cpu, Machine coding? Is that what machine coding is? Engineering the circuits of a cpu?


Not really. When most people talk of machine coding they mean directly (or via mnemonics) putting the 1s and 0s into the cpu's memory that act as a list of instructions for the cpu's mathematical circuitry and data/address bus structure.

These wouldn't be a bad place to start for cpus:
http://en.wikipedia.org/wiki/Central_processing_unit
http://en.wikipedia.org/wiki/Von_Neumann_architecture
http://en.wikipedia.org/wiki/Harvard_architecture
http://en.wikipedia.org/wiki/RISC

:cheers:
User avatar
goonerism_speek
 
Posts: 1

Print view this post

Re: Can I do this on a breadboard?

#7  Postby pSimon » Mar 26, 2010 12:49 pm

A pretty good starting point might be the PIC series of microprocessors.

http://www.microchip.com/

A simple 8-bit CPU, a few k of ram. Lots of types out there:

Just the ticket for a small electronics project.

There is a free development environment available at the website above.

All you need is a programmer. There are *lots* of home-build programmers out there - if you want to go that route (my experiences of most of the designs out there haven't been too good, and they don't integrate with the IDE).

I ended up with this one : http://www.olimex.com/dev/pic-mcp-usb.html which is USB, and seems to work pretty well with the IDE too.

PICs and LED's?

Have a look here: http://melabs.com/resources/articles/ledart.htm
User avatar
pSimon
 
Posts: 79

United Kingdom (uk)
Print view this post

Re: Can I do this on a breadboard?

#8  Postby epepke » Mar 26, 2010 1:41 pm

This is fairly easy, and thinking back to when I was a kid, here's how I would have done it. (Given the caveat that LEDs were not cheap, and I would have probably used neon bulbs, which take dangerous voltages.)

You'll need some keys, a 7-segment LED, and some diodes. You can get just the keys from some older or large scale keyboards. Unsolder them. I've put these in a breadboard, though they fit at rakish angles.

The polarity will depend on whether you have a common cathode or common anode display, but set it up that the current flows from each key to multiple segments of the display through a diode per segment. So the 1 key passes current through one diode to the upper right vertical segment and through another diode to the lower right vertical segment. (Put a resistor on the common pin of the display so you don't fry it.)

Diodes like this make a basic OR gate. So the upper right segment goes on if the 1 key or the 2 key or the 0 key or the 3 key etc. get pressed.
User avatar
epepke
 
Posts: 4080

Country: US
United States (us)
Print view this post

Re: Can I do this on a breadboard?

#9  Postby Cory Duchesne » Mar 28, 2010 2:47 am

pcCoder wrote:If you don't want to use a pre-engineered chips (7 segment driver) it may take a full-size breadboard. It seems to me that a basic driver can be made to just inputs to outputs, a bus (A, B, C, D inputs) would run through a series of gates that would be wired in such a way to produce a high output based on the input. This is a small schematic I drew up. Not perfect at all for certain, but a basic initial idea of what I think would be needed. Also this doesn't include other of functions that a 7 segment driver chip would include, such as a latch to hold the same output regardless of input, enable line to enable/disable the 7 segment LED, etc.

Image


pcCoder, that was incredibly kind of you to draw up that diagram. It is one of the clearest visual demonstrations of circuits I've come across.

I'm still confused about some really basic things though.

First, I wanted to ask you about those two thick horizontal lines that are parallel to each other near the bottom part of the diagram. In terms of the "anatomy" of any circuit, what is the term we use for these lines? They seem prominent enough to have their own term.

I understand how the top line carries the more negative charge (the "0") and the bottom line carries the more positive (the "1"). The 4 not gates forming the bridge between the two lines seem to convert the positive charge of the bottom line into the more negative charge that fills the top line. But I don't understand why it requires 4 not gates to do this. Isn't one not-gate enough?

And then the next step: each button receives a different binary number. But I'm not clear on the logic of this. Is each button a type of gate? What exactly is the reasoning behind feeding each button with a different number? Couldn't you just have each button transmit a "1", and then have each button's line solder itself in it's own unique way?

Further into the diagram, it shows gates close to the LEDS receiving signals sent by the buttons. But I can't quite grasp the logic here either.

I played around with an applet before, so I got a decent grasp of truth tables.

I think what I'm looking for here, if you have the time and inclination, is maybe a more detailed description of the logic behind your diagram. Like I said, it really opened my eyes, but I still can't quite wrap my head around what I'm seeing entirely. You're already helped me alot, thanks for your effort so far.
Last edited by Cory Duchesne on Mar 28, 2010 3:36 am, edited 1 time in total.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#10  Postby Cory Duchesne » Mar 28, 2010 2:55 am

goonerism_speek wrote:
Cory Duchesne wrote:... I'm more interested in building the driver circuit, because I want to actually engineer the cpu.


This is not really something you'd ever do on the silicon of a cpu, you'd do it with a abstract mathematical algorithm.


Yeah, but there can't be a mathematical algorithm without the hardware, the actual circuitry. pcCoder said that what I'm looking for is a 7-segment driver, which is a chip, is it not?

I don't necessarily need to build this driver. I just want to see how it works, so maybe I can just use diagrams or a software applet.


You say you want to understand the circuitry of the cpu, and not get involved in the maths, but the maths is pretty much all the cpu does.


Yeah, but it does math in a very strange way, not in a way that most people would understand. The circuitry is the math. There really is not math apart from the physical engineering of a processor.

Thanks a lot for the links! I'm going to check them out right now.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#11  Postby epepke » Mar 28, 2010 7:08 am

Doesn't seem to mater. Guy wants to fuck with an applet and not learn anything. Good for him. More work for me. Not sure why I care about educating anyone any more. Let them die without reproducing.
User avatar
epepke
 
Posts: 4080

Country: US
United States (us)
Print view this post

Re: Can I do this on a breadboard?

#12  Postby Cory Duchesne » Mar 28, 2010 2:58 pm

epepke, Tyrannical, pSimon, thank you for your replies, I will refer to your posts and explore your links in more detail.

Epepke, before I go and buy all the parts you suggested, I really should have a good grasp on the theory behind what I'm doing, and diagrams and applets can help. I found pcCoder's diagram to be the kind of thing I need right now to prepare me for the task of putting the parts together. The diagram made me realize how much I don't know. If I don't find understanding a diagram "easy" now then your suggested method of learning is not going to be "easy" at all.

Your original assertion that this would be easy made you seem not grounded in reality, and this latest burst of vileness only confirms that.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#13  Postby pcCoder » Mar 28, 2010 5:20 pm

Cory Duchesne wrote:First, I wanted to ask you about those two thick horizontal lines that are parallel to each other near the bottom part of the diagram. In terms of the "anatomy" of any circuit, what is the term we use for these lines? They seem prominent enough to have their own term.


These are bus wires. Often in a schematic, instead of drawing 8/16/32/64/etc wires, a line will be drawn that simply indicates the entire bus of wires. In this case, the dark lines actually represent the four input wires A, B, C, and D (where A is the most significant bit and D the least significant bit) and the AND gate inputs left to right connect to A, B, C, or D lines of that bus or the inverted of that bus.

Here is what it would look like:

Image

I understand how the top line carries the more negative charge (the "0") and the bottom line carries the more positive (the "1"). The 4 not gates forming the bridge between the two lines seem to convert the positive charge of the bottom line into the more negative charge that fills the top line. But I don't understand why it requires 4 not gates to do this. Isn't one not-gate enough?


The input lines are may be +5V for CMOS I think, 12V for TTL devices for a high, or 0V for a low. The gates simply invert it. So if one the bottom lines are a 0, then the matching top line will be a 1 (more positive). But since it is a bus, I'm just showing each line of the bus is inverted. Basically each of the AND gates needs to match with one input value, the one labeled 0 needs to have a high output when the input is A(0), B(0), C(0), D(0), so in order to do this, it takes the connections from the inverted lines so !0 & !0 & !0 & !0 = 1. Similarly, the one labeled 1 needs to have a high output when the input is A(0), B(0), C(0), D(1), so it takes A, B, and C from the inverted bus, meaning that they are expected to be 0 on the input so the inverted is 1, and D from the non-inverted bus so !0 & !0 & !0 & 1 = 1.

And then the next step: each button receives a different binary number. But I'm not clear on the logic of this. Is each button a type of gate? What exactly is the reasoning behind feeding each button with a different number? Couldn't you just have each button transmit a "1", and then have each button's line solder itself in it's own unique way?


That depends on the keypad you are using. I've seen three types of keypads. One, there is a common terminal and each button has its own line. Another, is a BCD keypad, where there is a common terminal and then a set of wires that contain the number of the button pressed as a binary coded decimal (0000 = 0, 1001 = 9). Last, is a matrix style keypad, with 4 in and 4 out wires, and which in/out set is active tells which button is pressed.

In the case of a common terminal keypad, then each button could connect more or less directly to the LED, just providing the diodes as mentioned by a poster earlier. The common terminal on the key pad could have the + (or - depending on the if the 7 segment LED is common anode or common cathode), then each other terminal can connect to some diodes and the other end of the diodes to the correct part of the 7 segment display (make sure to include current limiting resistor somewhere).

In the case of a matrix keypad, you would need an additional circuit to decode the matrix it into some value. I think a BCD keypad is really just a matrix keypad but with a built-in circuit to produce the BCD output.


Further into the diagram, it shows gates close to the LEDS receiving signals sent by the buttons. But I can't quite grasp the logic here either.

I think what I'm looking for here, if you have the time and inclination, is maybe a more detailed description of the logic behind your diagram. Like I said, it really opened my eyes, but I still can't quite wrap my head around what I'm seeing entirely. You're already helped me alot, thanks for your effort so far.


Okay. My circuit assumes the input is BCD, with 0000 representing number 0 and 1001 representing number 9. Each of the AND gates has a high output only if the number shown on the gate is pressed. Since an AND gate requires all inputs to be high in order for the output to be high, to have a high output on gate 0 would require all inputs to be inverted, on gate 1 all but the first inputs to be inverted, and so on. So, when the input is 0 (0000) AND gate 0 gets all it's inputs from the inverted input lines, so gets 1111 and the output would be high. But AND gate 1 gets its inputs in such a way that the inputs would be 1110, and so the output would be low, and so on. This section is really just a BCD to binary decoder. An example is also shown here: http://scitec.uwichill.edu.bb/cmp/online/P10F/decoders.htm. The difference I'm doing is instead of having the NOT gates in front of each AND gate where needed (which would take more than 4 NOT gates) I'm just separating the input into a non-inverted and inverted line and connected the input of the AND gates to the correct ones.

The outputs of this stage then connect to some OR gates controlling the LED segments a through g. For instance, the OR gate 'a' needs to have a high output if 0, 2, 3, 4, 5, 6, 7, 8, or 9 is pressed, so the outputs of those particular AND gates connect to the input of this OR gates. When the user presses 0, 2, 3, 4, 5, 6, 7, 8, or 9, the output of this OR gate would be high, and power the transistor which can provide more power for the LED segment a. The same basic thing is done for the other OR gates.

Now that I think about it, it may be simple enough to use diodes as a poster above mentioned. Something like this:
Image

If the output of the AND gate provides enough and if the diodes don't have to much of a voltage drop, then if any of the inputs to the diodes are high then the output would also be high enough to power the transistor, or if it is high enough, maybe directly power the LED segment.


Note it has been a while sense I've done any tinkering with electronics, so I could be wrong about all of the above.
Edit: Also, some of the output connections are wrong. For instance, when the value is 1, outputs segments b and c are needed, but it looks like it is wired for a and b instead.
pcCoder
 
Posts: 650
Age: 41
Male

United States (us)
Print view this post

Re: Can I do this on a breadboard?

#14  Postby pSimon » Mar 29, 2010 7:56 am

Nitpick:

"Proper" TTL (74S, 74LS, 74HC, 74HCT) is 5V

CMOS (74C, 4000 series) can run on about 3..15V

Cory:

How good is your electronics?

You might want to consider this book : http://www.amazon.co.uk/Art-Electronics-Paul-Horowitz/dp/0521370957 if you don't have it.

One of the very few books I have from University that I'd actually recommend.
User avatar
pSimon
 
Posts: 79

United Kingdom (uk)
Print view this post

Re: Can I do this on a breadboard?

#15  Postby pSimon » Mar 29, 2010 8:07 am

If you just want to know how a decoder "works", the best place to start is a data sheet like this:

http://www.google.co.uk/url?sa=t&source=web&ct=res&cd=2&ved=0CAsQFjAB&url=http%3A%2F%2Fweb.mit.edu%2F6.s28%2Fwww%2Fdatasheets%2FDM74LS47.pdf&ei=sF6wS53cFJCM0gT61I2GDg&usg=AFQjCNE5kzP1f3N3qSdyqW6OsWkQsVR5Tg&sig2=AVWvYFeOX_vvmgWge03J3w

Page 3 has a full schematic.

Bear in mind that being TTL, much of it is "negative logic".
User avatar
pSimon
 
Posts: 79

United Kingdom (uk)
Print view this post

Re: Can I do this on a breadboard?

#16  Postby Cory Duchesne » Mar 31, 2010 7:02 pm

pcCoder wrote:
Cory Duchesne wrote:First, I wanted to ask you about those two thick horizontal lines that are parallel to each other near the bottom part of the diagram. In terms of the "anatomy" of any circuit, what is the term we use for these lines? They seem prominent enough to have their own term.


These are bus wires. Often in a schematic, instead of drawing 8/16/32/64/etc wires, a line will be drawn that simply indicates the entire bus of wires.


Ah, I see. That makes understanding your schematic easier, although I still feel far far from understanding it. I have pretty much zero experience interpreting schematics, so I appreciate the patience you've given me here.

Can I ask you about the the initial bus of wires (A,B,C,D)?

You have two sets of bus wires. There is the bottom set, prior to the inversion, and then there is the top set which has been inverted via the 4 not-gates.

I honestly don't know which wires carry the 1 and which ones carry the 0.

Do the bottom set of bus wires (prior to the inversion) carry a "1" charge? Or do they carry a "0"? If the bottom 4 wires carry the "0" then that would mean that the top set of bus wires carries the "1".

It's hard to understand much when I'm not confident about the simplest of things.


In this case, the dark lines actually represent the four input wires A, B, C, and D (where A is the most significant bit and D the least significant bit) and the AND gate inputs left to right connect to A, B, C, or D lines of that bus or the inverted of that bus.


Among the four initial input wires, why would "A" be more significant? I would have assumed each input wire to be equally significant.


I understand how the top line carries the more negative charge (the "0") and the bottom line carries the more positive (the "1"). The 4 not gates forming the bridge between the two lines seem to convert the positive charge of the bottom line into the more negative charge that fills the top line. But I don't understand why it requires 4 not gates to do this. Isn't one not-gate enough?


The input lines are maybe +5V for CMOS I think, 12V for TTL devices for a high, or 0V for a low.


CMOS, TTL devices, OV - - I don't know these terms... I will google up on them later, but I just want to give you an idea of the extent of my current ignorance. :doh: Don't worry about clarifying those things, I'll do the research soon.


The gates simply invert it. So if one the bottom lines are a 0, then the matching top line will be a 1 (more positive). But since it is a bus, I'm just showing each line of the bus is inverted.


Yes, one thing I do understand now is why your schematic uses those 4 not-gates near the beginning. Earlier I didn't realize the single line represented 4 bus wires, so I couldn't understand why there are 4 not-gates. But since there are 4 bus wires, then yes, I see exactly why you would need 4 not gates. Thanks for explaining. :)

But there is still so much about your schematic that I don't get. :think:


Basically each of the AND gates needs to match with one input value,


Here's one of my biggest issues I have when trying to understand your schematic - I was taught that AND gates receieve two inputs and produce 1 output. I was also taught that AND gates require all of the inputs to be "1" in order to output a "1".

Your schematic shows the AND gates receiving many different combinations of inputs. None of them seem to receive matching inputs. In order for an AND gate to produce a "1" as an output, you need all your inputs to be "1" and i just don't see that happening in your schematic. Nothing is really conforming to what I was taught.

To make matters worse, the OR gates also have more than 2 inputs, which goes against what I know.



Basically each of the AND gates needs to match with one input value, the [AND gate] labeled 0 needs to have a high output when the input is A(0), B(0), C(0), D(0), so in order to do this, it takes the connections from the inverted lines so !0 & !0 & !0 & !0 = 1. Similarly, the [AND gate] labeled 1 needs to have a high output when the input is A(0), B(0), C(0), D(1), so it takes A, B, and C from the inverted bus, meaning that they are expected to be 0 on the input so the inverted is 1, and D from the non-inverted bus so !0 & !0 & !0 & 1 = 1.


There are so many things in his paragraph I don't understand that I don't know where to begin. This is not your fault, I'm just missing some piece of essential info, and I'm trying to figure out what it is I need to know to make your schematic make sense.

Why does the AND gate labeled 0 need to have a high output, and what do you even mean by "high output"? When you say a wire has high out put, is that just another way of saying it's carrying a "1"?

I understand that the AND gate labeled 0 takes all of the connections from the inverted lines. I can see that.

But what I don't see is why any of the AND gates, from 0 to 9, would need to do anything but produce a 1.

Each of the AND gates has a single output, which means that there are only 2 combinations of outputs possible, yet we have 10 different keys, each with it's own binary number, but with only a single output wire, it's only possible to express a 1 or a 0.

Am I supposed to assume that the output for each AND gate consists of multiple wires? If the output line of a single AND gate does not consist of multiple wires, then how can that output wire express anything other than a 1 or 0?

It seems like much of my confusion comes from the fact that I was taught that Gates worked a certain way, and the way they are functioning in your schematic is not conforming to how I was taught.

Also the OR gates you have later on in the progression are receiving more than two inputs, so it's hard for me to know what to make of it.

Sorry if this is frustrating you, I think I gave the impression that I know more than I do, so you are teaching me things assuming I know basic things that I in fact don't know. If you think that I need to focus on a simpler project, that that's what I'll do.

If you are motivated enough to keep helping me understand your schematic, then that would be great too.
Last edited by Cory Duchesne on Mar 31, 2010 8:50 pm, edited 1 time in total.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#17  Postby Cory Duchesne » Mar 31, 2010 7:05 pm

pSimon wrote:
Cory:
How good is your electronics?


Very poor. Never did a hands on project in my life. Everything I know is from an online tutorial where I got to play around with an applet.


You might want to consider this book : http://www.amazon.co.uk/Art-Electronics-Paul-Horowitz/dp/0521370957 if you don't have it.

One of the very few books I have from University that I'd actually recommend.


Yeah, looks like an excellent book. My library doesn't carry it, but when I get some money I'll probably buy it. Thanks.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post

Re: Can I do this on a breadboard?

#18  Postby pcCoder » Apr 01, 2010 12:11 am

Cory Duchesne wrote:
Ah, I see. That makes understanding your schematic easier, although I still feel far far from understanding it. I have pretty much zero experience interpreting schematics, so I appreciate the patience you've given me here.

Can I ask you about the the initial bus of wires (A,B,C,D)?

You have two sets of bus wires. There is the bottom set, prior to the inversion, and then there is the top set which has been inverted via the 4 not-gates.

I honestly don't know which wires carry the 1 and which ones carry the 0.

Do the bottom set of bus wires (prior to the inversion) carry a "1" charge? Or do they carry a "0"? If the bottom 4 wires carry the "0" then that would mean that the top set of bus wires carries the "1".


The wires A, B, C, D are input wires. In the spec sheet of a chip posted earlier, they would be labeled A3 A2 A1 A0. Neither bottom nor top carry just a '1' or a '0'. The bottom carries the original value of the input, some may be 1, others may be 0. The top carries the inverted values of the inputs. If the input is value 7 (0111) then the bottom lines would be (0, 1, 1, 1), but the top lines would be (1, 0, 0, 0) for (A, B, C, D).

As a result of the way the AND gates are connected, only the one for the value 7 would turn on. AND gate 0 would get inputs (1, 0, 0, 0), 1 would get (1, 0, 0, 1), 2 would get (1, 0, 1, 0), 3 would get (1, 0, 1, 1), 4 would get (1, 1, 0, 0), 5 would get (1, 1, 0, 1), 6 would get (1, 1, 1, 0), 7 would get (1, 1, 1, 1), 8 would get (0, 0, 0, 0) and 9 would get (0, 0, 0, 1). So, only the output of AND gate 7 would be high.

Now my circuit is a straight implementation of a BCD to decimal converter, which then contains basically a decimal to 7 segment converter. It is really overkill, but I forgot most of what I learned about reducing Boolean circuits from logic diagrams.

Among the four initial input wires, why would "A" be more significant? I would have assumed each input wire to be equally significant.


All that means is which wire carries the largest value. In the case of A, B, C, and D, D carries the value 1, C carries the value 2, B carries the value 4, and A carries the value 8. This is just how I labeled it when drawing it. It would normally be labeled going down, with D being the highest, A being the lowest, or using numbers such as A3...A1. If I toggle A from 0 to 1, I have added 8 to the value of the input. If I toggle D from 0 to 1, I have only added 1. The term is also used in computers. In computers, memory is accessed as a sequence of bytes (8 bits) When trying to access larger values, such as words (16 bits), dwords (32 bits), etc, how it is stored may depend on the computer. In Intel based computers, the least significant byte is stored first. That means, in order to start a 16 bit value containing the value 255 at a memory location identified as 1032, the first byte (at position 1032) would be 255 (FF in hex) and the second byte (at position 1033) would be 0. On PowerPC computers, this is reversed and the 0 would be stored in the first byte (position 1032) and 255 stored in the second byte (at position 1033). There are also other orderings as shown here http://en.wikipedia.org/wiki/Endianness




Here's one of my biggest issues I have when trying to understand your schematic - I was taught that AND gates receieve two inputs and produce 1 output. I will also taught that AND gates require all of the inputs to be "1" in order to output a "1".

Your schematic shows the AND gates receiving many different combinations of inputs. None of them seem to receive matching inputs. In order for an AND gate to produce a "1" as an output, you need all your inputs to be "1" and i just don't see that happening in your schematic. Nothing is really conforming to what I was taught.

To make matters worse, the OR gates also have more than 2 inputs, which goes against what I know.


There are also quad-input AND gates I'm pretty sure (a quick search shows 7421 as a dual 4-input AND), and you can wire them on your own to have any number of 'inputs' just by taking the outputs of previous gates and connecting them to the inputs of others. For example, a 3 input AND gate can be made by using 2 AND gates, and connecting the output of one to the input of the other, with the inputs of that one and the other input of the other serving as the 3 inputs. Basically, all inputs must be 1 for an output of 1 in an AND gate, and at least 1 input must be 1 for an output of 1 in an OR gate.



There are so many things in his paragraph I don't understand that I don't know where to begin. This is not your fault, I'm just missing some piece of essential info, and I'm trying to figure out what it is I need to know to make your schematic make sense.

Why does the AND gate labeled 0 need to have a high output, and what do you even mean by "high output"? When you say a wire has high out put, is that just another way of saying it's carrying a "1"?

I understand that the AND gate labeled 0 takes all of the connections from the inverted lines. I can see that.

But what I don't see is why any of the AND gates, from 0 to 9, would need to do anything but produce a 1.

Each of the AND gates has a single output, which means that there are only 2 combinations of outputs possible, yet we have 10 different keys, each with it's own binary number, but with only a single output wire, it's only possible to express a 1 or a 0.

Am I supposed to assume that the output for each AND gate consists of multiple wires? If the output line of a single AND gate does not consist of multiple wires, then how can that output wire express anything other than a 1 or 0?

It seems like much of my confusion comes from the fact that I was taught that Gates worked a certain way, and the way they are functioning in your schematic is not conforming to how I was taught.

Also the OR gates you have later on in the progression are receiving more than two inputs, so it's hard for me to know what to make of it.

Sorry if this is frustrating you, I think I gave the impression that I know more than I do, so you are teaching me things assuming I know basic things that I in fact don't know. If you think that I need to focus on a simpler project, that that's what I'll do.

If you are motivated enough to keep helping me understand your schematic, then that would be great too.


Well, I've made a few small connection errors in my diagram that I've included below. They corrections don't look good because I've deleted the original sketch so I just went and fixed them in a paint application. The green wires show where the 1 values are if the input is a value 7, so you can see which wires are 1, showing that only AND gate 7 gets all inputs as 1 so has an output as 1, and that output only connects to the inputs of certain OR gates (a, b, and c segments of an LED) and so the output of them can power the LED.


Image
pcCoder
 
Posts: 650
Age: 41
Male

United States (us)
Print view this post

Re: Can I do this on a breadboard?

#19  Postby pSimon » Apr 01, 2010 12:25 pm

This is a pretty good book too: http://www.amazon.com/CMOS-Cookbook-Second-DON-LANCASTER/dp/0750699434

It concentrates more on Digital Electronics than "Tha Art of..".

It's very readable, and very practical, IMO
User avatar
pSimon
 
Posts: 79

United Kingdom (uk)
Print view this post

Re: Can I do this on a breadboard?

#20  Postby Cory Duchesne » Apr 02, 2010 8:28 pm

pcCoder, your effort has been invaluable. I will refer to this thread often.

pSimon, thanks again for another book recomendation. I got this added to my wish list, thanks again.

I have to get back to learning python! That was my original goal, but I couldn't help wondering about deeper things, which eventually led to this thread. Farewell.
User avatar
Cory Duchesne
THREAD STARTER
 
Name: Cory Duchesne
Posts: 68
Age: 43
Male

Country: Canada
Print view this post


Return to General Science & Technology

Who is online

Users viewing this topic: No registered users and 1 guest