News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Transistors and Such?

Started by Bieb, October 10, 2005, 07:41:40 PM

Previous topic - Next topic

Bieb

Okay, so, having read through some of the Art of Assembly's hardware section, I see how processors use hardware logic gates and such, but what I'd like to know is, how do you go about actually building such a thing from transistors?  Does anyone here know this?  For instance, suppose I wanted a machine that would just take four numbers (1 bit each) and then OR the first two together, OR the second two together, and then AND the result of the last two operations.  Sounds like it should be simple enough, and not take a whole lot in the way of transistors, but how would you actually physically put it together?

If I can figure this stuff out, maybe I'll go and put together a calculator of some variety.  It'd probably take a while, but it'd impress the hell out of people.

tenkey

A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

P1

Quote from: Robert Bieber on October 10, 2005, 07:41:40 PMmaybe I'll go and put together a calculator of some variety.  It'd probably take a while, but it'd impress the hell out of people.
Right now your proposing a special function, four 1 bit operations with a single bit output.  You don't need a transistor to wire 'or' logic like that and maybe a relay for the 'and' operation at the end.   I did stuff like that a long time ago.  Now I handle 32 bits at a time in nano seconds.   :green2

WIN32ASM has an electronics forum.  You can ask questions like these in.

Regards,  P1  :8)

Bieb

Wait, I thought transistors were used for all logical operations?  Aren't they supposed to form the NAND gate, that you construct everything else from?

Oh, and tenkey, that site you linked to had my mouth watering, but when I clicked on the links, the pages never loaded...

drhowarddrfine

Yes, transistors form the core of all logic operations although some can be performed with diodes alone.  For example, one transistor can perform NOT.  You need two for AND/OR.  You would never see that in a real chip because they have to handle impedances and current driving, etc.  I've built gate arrays before.

tenkey

The site worked earlier in the day. I hope it's a temporary condition. That site has been there for some time.

The tricky part about using switches or relays for logic is sneak paths. That's because current can go both ways through the switch. Ghost keys on a keyboard matrix is an example of the effects of sneak paths. The electrical problems that happen when car wiring breaks are another.

Transistors are what are used in ICs (integrated circuits or "chips"). In older logic, resistors or diodes provided the AND/OR function, and the transistor or tube/valve that followed it provided the NOT function.

Then there is the old switch/relay technology.

And there is fluidic logic, which uses fluids like air.
A programming language is low level when its programs require attention to the irrelevant.
Alan Perlis, Epigram #8

Bieb

Okay, I found a site that explained how transistors work, that two of the leads are connected when a signal is not present in the third lead.  There's just one thing I'm not getting, though, that will make it sort of difficult to actually build anything.  How can you have a signal with just a single lead?  Don't you need two control leads, so they can form a circuit??

drhowarddrfine

This must be a pretty bad site.  There are three leads for most transistors.  One each for emitter, collector and base.  On an NPN type, current flows from emitter to collector and controlled by the base.  The signal applied to the base controls the flow of current from emitter to collector.  In digital circuits, the input signal is either all the way on/off while in analog it can be anywhere in between.

Bieb

That's pretty much exactly what it says.  What I'm asking is how do I provide a signal with a single wire?  Doesn't it take two to conduct electricity?

dioxin

<<One each for emitter, collector and base.>>

Ye olde Worlde of elektroniks!
Most ICs these days use variations of CMOS where field effect transistors are used and have terminals called Drain, Source and Gate.


<<What I'm asking is how do I provide a signal with a single wire?>>

The signal is applied between 2 pins, one of the 3 pins is usually tied to a reference (maybe 0V, may be +5V) then a signal is applied to the control pin (called the Base or Gate depending on technology used) that means a signal relative to the reference pin (Emitter or Source). That signal then controls the current flow from the 3rd pin (Collector or Drain) to the reference pin.

Try reading pages 8-13 of this:
http://www.easternct.edu/personal/faculty/rosienej/DigitalLogic/IntrotoElectronics.pdf

Paul.

MichaelW

Robert,

Field-effect transistors are controlled by an electric field produced by a voltage differential between the gate and the conductive channel that connects the source and drain. The gate is actually insulated from the source-channel-drain by an insulating oxide film, so it's effectively an open circuit. Neglecting some tiny leakage, etc currents, essentially the only current that flows in the gate lead when the transistor switches state is that necessary to charge/discharge the gate capacitance. It is this characteristic, coupled with the complementary paring of transistors in CMOS circuits, that has enabled the construction of ultra-low power processors and displays. So after ~7 years of moderate to occasionally heavy usage, my HP handheld calculator is still running on the original batteries :bg


eschew obfuscation

Bieb

Okay, I drew a diagram that hopefully will show exactly the problem I'm having.



Now, from what I understand of transistors, the circuit that the LED is on will normally be closed, and the LED will light up.  But, if there's a current in the center pin of the transistor, then it should shut off the circuit.  But now, here's my problem.  If I try to provide a control current with another battery, the battery has two terminals.  How can they both be connected to that one center pin?

drhowarddrfine

The problem is your not understanding the basics of electron flow.  There are many variations of where to connect the batteries.  One would be to connect the positive terminal of one battery to the collector and the negative to the emitter to provide your main electron flow.  Then you could connect another batterys negative terminal to the emitter, forming a common ground, and the positive side to the base.  This positive base will start the main flow through the transistor from emitter to collector. 

Now all of this has to be controlled with resistors or you will, essentially, be short circuiting everything and it just won't work.  You need to get a good book on basic electronics to understand how all this works.  What I've told you is really very basic, simple stuff but, in reality, is a little more complicated than that.

MichaelW

Robert,

Assuming you are using a bipolar NPN transistor, you could use a circuit similar to the example where a solar cell is used to control the transistor, perhaps 10% down the page here:

http://www.ibiblio.org/kuphaldt/electricCircuits/Semi/SEMI_4.html

And to understand the schematics you need to understand conventional versus electron flow, and that the arrows on the device symbols "point" in the direction of conventional flow:

http://www.allaboutcircuits.com/vol_1/chpt_1/7.html

You could calculate all of the device currents to ensure that nothing will fry, or you could just keep the battery voltage low (as in single cell) and limit the duration of the test (and assume that the LED and possibly the transistor may be destroyed).

http://www.solarbotics.net/bftgu/starting_elect_semic_1j.html

http://en.wikipedia.org/wiki/Transistor

eschew obfuscation