Lab 2 - ECE 421L 

Authored by Matt Mumm, mummm2@unlv.nevada.edu

Sept 6, 2013

  

Today's Lab we will be going over the design of a DAC.
   

Pre-Lab:

1) First we need to get the proper library files.  Download Lab2.jelib file, which contains a simulation example of a 10-bit DAC. 

2) Open the newly downloaded library file and your course library file inside electric. 

3) Go to Cell -> Cross Library Copy

4) You will want to copy over the sim_ADC_DAC{sch} into your course library. 

5) Be sure to get all of its subcells, and all related views.

 

1.JPG

 

6) Hit done once the copy is complete.  

7) Go ahead and close the lab2.jelib library, so that only one library is open, as seen below

2.JPG

 

8) Go ahead and select the cell, sim_ADC_DAC{sch} and run it. 

9) After LTSpice is loaded, go ahead and plot V(vin) and V(vout) under Plot Settings -> Add Trace.  You should get a graph that looks like this below.

3.JPG

10) Be sure to save and backup your plots and libraries as you are working on the lab. 

  

 

Lab

Today we are going to take an ideal input signal from an ADC and convert it back to analog.  Doing this allows us to see how the signal changes. 

    1. Start by duplicating the cell Ideal_10bit_DAC and  renaming it.
    2. Open the newly created cell Ideal_10bit_DAC and double clicking on the schematic (indicated by {sch})
    3. Delete everything except the icon, VREFP pin, VREFM pin and Vout pin, as seen below.
    4. 4.JPG
    5. Now we will build the circuit, using N-well resistors. Since there are 10 input bits, we need 10 sets of resistors. The picture below only shows a 5 bit input. 
    6. L2_f4.jpg
    7. Each R will be 10K and to create 2R, you will need to put 2 resistors in series. Do Not place any switches as pictured above. Ignore the capacitor and resistor load for now, we will come back to that later. 
    8. The pins can be located under components and within schematic on the drop down menu. 
    9. The start of your circuit should look like this:5.JPG
    10. Notice that the pins appeared to be labeled, however this is not the case.  They are actually connections.  In order to export them, you need to select the pin and hit "ctrl+e" and a new window will appear. Label them B9 to B0.  Do not worry any other options listed.
    11. Be sure to create a separate pin, exported to "vdd", connected to a large resistance and then grounded.
    12. Make sure you check your circuit
 
    1. Start by duplicating the cell, sim_ADC_DAC{sch} and renaming it. 
    2. Delete the current DAC icon that is in there. 
    3. Drag and drop the icon (indicated by the blue dot) of your new DAC, that you created above, where the old one was. 
    4. 6.jpg
    5. Connect all the pins as they were before and be sure to check for errors.
       
    1. Duplicate your sim_ADC_DAC{sch} and rename it. 
    2. Go ahead and delete the ADC portion. 
    3. Ground the inputs B0 to B8.  Connect Vin to B9. 
    4. 9.JPG
    5. We will need to change the sine function to a pulse function, as seen highlighted above.
    6. Now go to your DAC schematic and add in a capacitor, 10pF, between Vout and the resistors. Ground the capacitor.
    7. Finally, running your simulation will give you a graph of charging a capacitor and you can calculate the delay time.

  

  What if the switches, seen in the schematic near the top, are not small compared to R?  There will be a voltage drop across the switches, which will lower your overall output and cause your output not to be as smooth.

   

   

   

   
Make sure to save and backup all your information

My Jelib File

   

More information can be found at cmosedu.com