<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" id="new55">
  <name>CMOS Logic</name>
  <metadata>
  <md:version>2.12</md:version>
  <md:created>2000/08/04</md:created>
  <md:revised>2008/05/28 16:58:27.843 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="wlw">
      <md:firstname>Bill</md:firstname>
      
      <md:surname>Wilson</md:surname>
      <md:email>wlw@madriver.net</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="wlw">
      <md:firstname>Bill</md:firstname>
      
      <md:surname>Wilson</md:surname>
      <md:email>wlw@madriver.net</md:email>
    </md:maintainer>
    <md:maintainer id="liqun">
      <md:firstname>Liqun</md:firstname>
      
      <md:surname>Wang</md:surname>
      <md:email>liqun@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="lizzardg">
      <md:firstname>Elizabeth</md:firstname>
      
      <md:surname>Gregory</md:surname>
      <md:email>elizabeth.gregory@gmail.com</md:email>
    </md:maintainer>
    <md:maintainer id="jsilv">
      <md:firstname>Jeffrey</md:firstname>
      <md:othername>M</md:othername>
      <md:surname>Silverman</md:surname>
      <md:email>JSilverman@astro.berkeley.edu</md:email>
    </md:maintainer>
    <md:maintainer id="gerardw">
      <md:firstname>Gerard</md:firstname>
      
      <md:surname>Wysocki</md:surname>
      <md:email>gerardw@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="swkravitz">
      <md:firstname>Scott</md:firstname>
      <md:othername>W</md:othername>
      <md:surname>Kravitz</md:surname>
      <md:email>swkravitz@gmail.com</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>CMOS Logic</md:keyword>
  </md:keywordlist>

  <md:abstract>Introducing technology CMOS, that means complementary MOS, including how to make p-channel transistor and how this one works.</md:abstract>
</metadata>

  <content>
    <para id="para1">
      Consider the following, shown in <cnxn target="fig44"/>.
    </para>


    <figure id="fig44">
      <media type="image/png" src="4.44.png"/>
      <caption>A PMOS transistor</caption>
    </figure>


    <para id="para2">
      This looks a lot like our previous MOSFET except that now we
      have an n-type substrate and the source and drain regions are
      p-type. If we apply a <emphasis>negative</emphasis>
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>gs</m:mi>
      </m:msub></m:ci></m:math> (with the source connected to the
      n-type substrate) then the induced negative charge on the gate
      will drive away the electrons, and if the bands under the gate
      are bent up sufficiently, form an <cnxn target="fig45">inversion
      layer</cnxn> of <term>holes</term> thus making an enhancement
      mode <term>p-channel MOSFET</term>, or a PMOS transistor. (As
      opposed to an NMOS transistor which we studied first.). Note
      that a PMOS transistor will have a negative
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>T</m:mi>
      </m:msub></m:ci></m:math>.  That is, the gate voltage has to be
      <emphasis>less than the source/substrate voltage</emphasis> in
      order to turn the device on. The more negative
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>gs</m:mi>
      </m:msub></m:ci></m:math>, the more current we will have flowing
      through the device.
    </para>


    <figure id="fig45">
      <media type="image/png" src="4.45.png"/>
      <caption>Inversion of an n-type layer</caption>
    </figure>


    <para id="para3">
      It turns out that a combination of both an n-channel and a
      p-channel device on the same circuit can be very
      advantageous. Such technology is called <term>CMOS</term>, for
      "complementary MOS". Here is how we use a p-channel
      transistor in the inverter circuit.
    </para>


    <para id="para4">
      First of all, however, we have to see how we would make
      one. There is a fundamental problem in trying to use both
      n-channel and p-channel devices in the same circuit. What is it?
      It would seem we need two different kinds of substrates, both a
      p-type substrate for the n-channel transistor, and an n-type
      substrate for the p-channel device. There is a way around this
      problem by making what is called a <term>tank</term> or a
      <term>moat</term>. A moat is a relatively deep region of one
      type of material placed into a host substrate of the opposite
      type (<cnxn target="fig46"/>). We can put n-type source/drain
      regions into the p-substrate and p-type source/drain regions
      into the n-moat. In <cnxn target="fig47"/>, we will also show
      the gates, and how the whole inverter is connected together.
    </para>


    <figure id="fig46"><media type="image/png" src="4.46.png">
<param name="print-width" value="3in"/>
</media><caption>Preparing for a CMOS inverter</caption></figure>


    <figure id="fig47"><media type="image/png" src="4.47.png">
<param name="print-width" value="3in"/>
</media><caption>A CMOS inverter </caption></figure>


    <para id="para5">
      Now let's draw the <cnxn target="fig48">schematic</cnxn>: A
      p-channel device is drawn just like an n-channel device, except
      we put a little "bubble" on the gate to signify that it is a
      MOSFET of a different color. Although we usually don't do this
      all the time, we have also shown the substrate connections in
      this diagram. These connections show that a MOSFET is at least a
      four terminal device, not a three terminal one as people often
      assume. Since, in a p-channel device, the substrate is n-type,
      we show the substrate connection as an outward pointing
      arrow. The p-type substrate for the n-channel device is shown as
      an inward pointing arrow. The n-channel substrate is connected
      to ground, the p-channel substrate is connected to
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>dd</m:mi>
      </m:msub></m:ci></m:math>.  Note that since the n-moat is at
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>dd</m:mi>
      </m:msub></m:ci></m:math> and the p-substrate is at ground, the
      moat-substrate p-n junction is reverse biased, and so no current
      should flow between them.
    </para>


    <figure id="fig48">
      <media type="image/png" src="4.48.png"/>
      <caption> Schematic of a CMOS inverter</caption>
    </figure>


    <para id="para6">
      We usually do not label the source and drain either, but we do
      here, just for completeness. Note that unlike the bipolar
      transistor, the FET is truly a symmetric device. There is really
      no way to tell the source from the drain. By convention, we call
      the element which is connected to the substrate (or moat) the
      source, and the other the drain. You will sometimes hear the
      region under the gate (either substrate or moat) referred to as
      the <term>backbody</term>.
    </para>


    <para id="para7">
      Now let's see how this circuit works. If
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>in</m:mi>
      </m:msub></m:ci></m:math> is high (at or near
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>dd</m:mi>
      </m:msub></m:ci></m:math>) the NMOS transistor will be turned
      on. The voltage between the gate and substrate of the p-channel
      device is at or near zero. The gate is at
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>dd</m:mi>
      </m:msub></m:ci></m:math> and so is the moat! Hence the upper
      transistor will be turned off. The output will thus be
      <emphasis>low</emphasis>.
    </para>


    <para id="para8">
      If the input voltage is at or near ground (a "low") then the
      n-channel device is turned off. The voltage between the gate and
      substrate of the p-channel device is now
      <m:math>
	<m:apply>
	  <m:mo>≂</m:mo>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>V</m:mi>
		<m:mi>dd</m:mi>
	      </m:msub>
	    </m:ci>
	  </m:apply>
	</m:apply>
      </m:math>. (The gate is 
      <m:math>
	<m:apply>
	  <m:mo>≂</m:mo>
	  <m:cn>0</m:cn>
	</m:apply>
      </m:math> and the substrate is at
      <m:math>
	<m:apply>
	  <m:plus/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mi>dd</m:mi>
	    </m:msub>
	  </m:ci>
	</m:apply>
      </m:math>.) If the PMOS transistor has a threshold voltage
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>T</m:mi>
      </m:msub></m:ci></m:math> of, say, -2 V, then it will be turned
      <emphasis>on</emphasis> and the output will be
      <emphasis>high</emphasis>. Note however, that in either state,
      high or low, <emphasis>there is no static current flowing
      through the inverter</emphasis>.
    </para>


    <para id="para9">
      The transfer characteristics for this circuit. Are a little more
      complicated. First, let's make sure we have our voltages and
      currents <cnxn target="fig49">defined</cnxn>. From the figure,
      <m:math><m:ci><m:msub><m:mi>V</m:mi>
      <m:mrow><m:mi>gs</m:mi><m:mo>-</m:mo><m:mi>n</m:mi>
      </m:mrow></m:msub></m:ci></m:math> the n-channel gate-source
      voltage is just Vin.  <m:math><m:ci><m:msub><m:mi>V</m:mi>
      <m:mrow><m:mi>gs</m:mi><m:mo>-</m:mo><m:mi>p</m:mi>
      </m:mrow></m:msub></m:ci></m:math> the gate-source voltage for
      the p-channel device is
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>V</m:mi>
		<m:mi>in</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:apply>
	      <m:times/>
	      <m:ci>
		<m:msub>
		  <m:mi>V</m:mi>
		  <m:mi>dd</m:mi>
		</m:msub>
	      </m:ci>
	      <m:ci>
		<m:msub>
		  <m:mi>I</m:mi>
		  <m:mrow>
		    <m:mi>d</m:mi>
		    <m:mo>-</m:mo>
		    <m:mi>n</m:mi>
		  </m:mrow>
		</m:msub>
	      </m:ci>
	    </m:apply>
	  </m:apply>

	  <m:ci>
	    <m:msub>
	      <m:mi>I</m:mi>
	      <m:mrow>
		<m:mi>d</m:mi>
		<m:mo>-</m:mo>
		<m:mi>p</m:mi>
	      </m:mrow>
	    </m:msub>
	  </m:ci>

	  <m:apply>
	    <m:times/>
	    <m:ci>
	      <m:msub>
		<m:mi>I</m:mi>
		<m:mi>d</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:ci>
	      <m:msub>
		<m:mi>V</m:mi>
		<m:mrow>
		  <m:mi>ds</m:mi>
		  <m:mo>-</m:mo>
		  <m:mi>p</m:mi>
		</m:mrow>
	      </m:msub>
	    </m:ci>
	  </m:apply>
	</m:apply>
      </m:math> the drain source voltage for the p-channel transistor
      can be written as
      <m:math>
	<m:apply>
	  <m:minus/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mrow>
		<m:mi>ds</m:mi>
		<m:mo>-</m:mo>
		<m:mi>n</m:mi>
	      </m:mrow>
	    </m:msub>
	  </m:ci>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mi>dd</m:mi>
	    </m:msub>
	  </m:ci>
	</m:apply>
      </m:math>. We have two sets of <cnxn target="fig50">characteristic curves</cnxn>: Note that since
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mrow>
		<m:mi>gs</m:mi>
		<m:mo>-</m:mo>
		<m:mi>p</m:mi>
	      </m:mrow>
	    </m:msub>
	  </m:ci>

	  <m:apply>
	    <m:minus/>
	    <m:ci>
	      <m:msub>
		<m:mi>V</m:mi>
		<m:mi>in</m:mi>
	      </m:msub>
	    </m:ci>
	    <m:ci>
	      <m:msub>
		<m:mi>V</m:mi>
		<m:mi>dd</m:mi>
	      </m:msub>
	    </m:ci>
	  </m:apply>
	</m:apply>
      </m:math>, when
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mi>in</m:mi>
	    </m:msub>
	  </m:ci>
	  <m:cn>0</m:cn>
	</m:apply>
      </m:math>V,
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mrow>
		<m:mi>gs</m:mi>
		<m:mo>-</m:mo>
		<m:mi>p</m:mi>
	      </m:mrow>
	    </m:msub>
	  </m:ci>
	  <m:cn>-5</m:cn>
	</m:apply>
      </m:math>V and so the transistor is strongly turned on.
    </para>


    <figure id="fig49">
      <media type="image/png" src="4.49.png"/>
      <caption>Defining voltages </caption>
    </figure>


    <figure id="fig50">
      <media type="image/png" src="4.50.png"/> <caption> Drain
      currents for the two transistor as a function of input voltage
      and <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>ds</m:mi>
      </m:msub></m:ci></m:math></caption>
    </figure>


    <para id="para10">
      We have a number of different "load lines" in this case, because
      for each <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>in</m:mi>
      </m:msub></m:ci></m:math> we have a different curve for both the
      n and p channel transistors. This is shown in <cnxn target="fig51"/>. The black spots show the point of
      intersection. Follow a few of the curves along to see if you
      agree with where the spots have been placed. We have also added
      a pair of dotted curves for
      <m:math>
	<m:apply>
	  <m:eq/>
	  <m:ci>
	    <m:msub>
	      <m:mi>V</m:mi>
	      <m:mi>in</m:mi>
	    </m:msub>
	  </m:ci>
	  <m:cn>2.5</m:cn>
	</m:apply>
      </m:math>V so we can get the "turn-over" point. Projecting the
      location of the black dots to the
      <m:math><m:ci><m:msub><m:mi>V</m:mi>
      <m:mrow><m:mi>ds</m:mi><m:mo>-</m:mo><m:mi>n</m:mi>
      </m:mrow></m:msub></m:ci></m:math> (or
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>out</m:mi>
      </m:msub></m:ci></m:math>) axis will gives us a value for
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>out</m:mi>
      </m:msub></m:ci></m:math> for each of the input voltages,
      <m:math><m:ci><m:msub><m:mi>V</m:mi><m:mi>in</m:mi>
      </m:msub></m:ci></m:math>.  The resulting curve is shown in
      <cnxn target="fig52"/>.  This gives us a good "feel" for how the
      inverter works, and how the output varies with the input. Note
      that this transfer curve is quite symmetric about 2.5 volts, and
      goes all the way from +5 to 0 volts on the output.
    </para>


    <figure id="fig51">
      <media type="image/png" src="4.51.png"/>
      <caption>Getting the transfer function</caption>
    </figure>


    <figure id="fig52">
      <media type="image/png" src="4.52.png"/>
      <caption>CMOS inverter transfer characteristics</caption>
    </figure>



  </content>
  
</document>
