Logic Styles with Mosfets
Total Page:16
File Type:pdf, Size:1020Kb
Logic Styles with MOSFETs NMOS Logic One way of using MOSFET transistors to produce logic circuits uses only n-type (n-p-n) transistors, and this style is called NMOS logic (N for n-type transistors). An inverter circuit in NMOS is shown in the figure with n-p-n transistors replacing both the switch and the resistor of the inverter circuit examined earlier. The lower transistor in the circuit operates as a switch exactly as the idealised switch in the original circuit: with 5V on the Gate input, the conducting channel is created in the transistor and the “switch” is closed; with 0V on the Gate there is no channel and the transistor is non-conducting - the “switch” is open. The depletion mode transistor is produced by adding a small amount of donor material to the The upper transistor, called a depletion mode channel region of a n-p-n transistor, so that there are a small number of free electrons in the channel transistor, operates as a resistor to limit current even when there is no electric field across the flow when the “switch” is closed. This transistor is insulator. This provides a connection through the a modified n-p-n transistor that always has a transistor for all Gate voltages. The conductivity of channel present and is always conducting, although the channel is lowest (Resistance is highest) when the conductivity is low when there is 0V on the the Gate is at 0V. When the Gate is at 5V and more Gate and higher when 5V is on the Gate: see Box. free electrons are pulled into the channel by the electric field, the conductivity is highest (Resistance The function of this transistor is purely resistive is lowest). The transistor acts a variable Resistance. and is present, as in the earlier circuit, to restrict This is quite useful in NMOS circuits as when there is current flow through the circuit and the output current flow and limit power consumption in the voltage is at 0V, the resistance of the depletion circuit. A transistor is used as a resistor because mode transistor is highest limiting the current flow. the space taken up on the substrate is much less When the circuit is opened and the output voltage than with other methods of producing resistors on starts rising to 5V, the resistance decreases allowing silicon. a more rapid switching of the output to 5V. An NMOS NAND circuit is shown in the figure to the right. Again n-p-n transistors are used to replace the ideal switches of the earlier circuit, while a depletion mode n-p-n transistor replaces the resistor. It operates in exactly the same way as the earlier circuit. NMOS circuits suffer the same faults as our earlier circuits but have an extra electrical problem as well. The problems seen are:- • continuous power consumption when a circuit is made through the logic and a current flows. • Asynchronous switching times as it is quicker to switch the output from 5V→0V → than from 0V 5V (see earlier explanation) • the new electrical problem is that the switch transistors have a small resistance, so that when a current flows there is a small voltage drop across the switch transistors and the output voltage does not quite reach 0V. This causes problems when there are large collections of interconnected circuits, and extra circuitry has to be added to restore the voltage to 0V. A large number of circuits can be placed on a single piece of silicon and interconnected to produce complex circuits. NMOS logic was used extensively in the 1970s and early 1980s for most digital semi-conductor devices, “chips”, e.g. the Intel 8086 and Motorola 68000 microprocessors. 17 CMOS Logic Most modern chips use CMOS logic, as it has many advantages over NMOS: there were operational problems with CMOS in the past that caused NMOS logic to be used for many years. In CMOS circuits both n-p-n and p-n-p MOSFET transistors are used with circuits structured into 2 parts. One part consisting of purely n-p-n transistors controls the connection of the output of the circuit to the 0V power supply terminal, i.e. it sets the output to a ‘0’, while the other part consisting of purely p-n-p transistors controls the connection of the output to the 5V power supply terminal, i.e. it sets the output to a ‘1’. This can be seen in the figure to the right which shows a CMOS inverter circuit. CMOS stands for Complementary MOS. The Complementary comes from the operation of the circuit parts such that only one part makes a connection between the output and the power supply at any time: the n-p-n part or the p-n-p part. There must never be an arrangement when the output has a good connection to both power supply terminals as then a short-circuit condition exists and the circuit will be damaged. In the inverter, the input controls both the upper p-n-p transistor and the lower n-p-n transistor. With 5V on the input the lower transistor conducts, but not the upper, and the output is at 0V; with 0V on the input the upper transistor conducts, but not the lower, and the output is 5V. Either the upper or lower circuit connects the output to a power supply terminal, but there is never a good connection to both. The figure to the left shows the 2 possible configurations of the inverter with switches replacing the transistors: the circle on the input to the upper switches indicates that the switch is closed when 0V is on the switch control. The figure on the next page shows the CMOS logic for the 2-input NOR gate. It has 2 n-p-n and 2 p- n-p transistors. The circuit outputs 5V only when both p-n-p transistors are conducting, i.e. when both inputs are 0V. At all other times one of the inputs is at 5V, one of the n-p-n transistors is conducting, and at most one of the p-n-p transistors, but not both, so that the output is at 0V. The different configurations of the NOR circuit can be seen in the switch diagrams in the figure. Again, there is never a constant current flow through the circuit and never a short-circuit. Examining the lower part of the circuit (at the bottom of the figure), the output is at ‘0’ if input A is ‘1’ or input B is ‘1’ - the NOR function. For the upper part of the circuit the output is at ‘1’ if both input A is ‘0’ and input B is ‘0’ - this function is NOT(A) AND NOT(B). Of course this function is, by deMorgan’s Rule, just the NOR of A and B. Thus both the upper and lower parts perform the NOR function: the upper part gives the 1s in the NOR truth table, the lower part the 0s. CMOS circuits are much better than their NMOS equivalents:- • For no set of inputs is there a circuit through the transistors connecting the power supply terminals, so that there is no continuous current flow and no continuous power consumption. However, as is set out below, there is some power consumption when the circuit configuration is changing. • the transistors can be made to provide symmetric switching times for both output transitions: 5V→0V and 0V→5V. This makes CMOS logic faster than the equivalent NMOS circuit as the latter has a longer 0V→5V switching time. • Since there are no constant current flows, there are no voltage drops across the transistors and CMOS circuits output full 5V and 0V signals. • There is always a good connection between the output and the power supply: in NMOS there is a resistive connection to 5V. The last 2 points make building large circuits much easier than for NMOS: it is just a matter of plugging CMOS circuits together, although there are times when more complex circuits provide faster and/or smaller solutions. It should be noted that there are many ways to put n-p-n and p-n-p transistors together that do not produce CMOS circuits, i.e. circuits without complementary action. 18 Power Consumption in CMOS circuits This arrives from 2 effects, which can be examined by considering the inverter circuit with its input at 0V and its output at 5V. When the input is changed to 5V both transistors start to change, the upper to a non-conducting state and the lower to a conducting state, and electrons start to move through the lower transistor from 0V to the output which is still at 5V. Since they move across a voltage drop power is consumed, until enough electrons arrive at the output to reduce its voltage to 0V. There is a similar effect on switching the input from 5V to 0V: the output changes from 0V to 5V, but this time it is the electrons moving through the voltage drop across the upper transistor that causes the power consumption, until enough positive charge has built up at the output for it to be at 5V. The amount of energy consumed is determined by the number of electrons that have to cross to or from the output to change the voltage to 0V or 5V respectively. The number of electrons in each case is the same and is 19 controlled by the capacitance of the output (capacitance of a body is the amount of charge required to change its voltage by 1 Volt), which is controlled by structural factors.