Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Two-Bit D/A Converter Lab: Designing a Two-Bit Digital-to-Analog Converter, Study notes of Computer Science

A lab exercise for designing a two-bit digital-to-analog converter (dac). Students are required to analyze equivalent circuits, derive resistor values, and write software for the avr microcontroller to generate analog voltages. The document also includes pre-lab assignments and deliverables.

Typology: Study notes

2012/2013

Uploaded on 03/22/2013

dhritiman
dhritiman 🇮🇳

4.7

(6)

107 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Lab 4 Two Bit D/A converter
Circuit 4-1 A Two Bit DAC (ECE 5430 students, a four-bit DAC with an op-amp is required)
The requirement for this D/A converter is that it needs to generate at VA voltages of
0.0VS, 0.30VS, 1.0VS and a value approximately halfway between 0.30VS and 1.0VS.
The value of VS is the reference voltage of the board. This midway voltage is left as a
variable so that the resulting calculations have an extra degree of freedom.
Background
Typically, a D/A chip is used to convert a digital value into an analog signal. Many D/A
chips use similar 2R-R ladders, although other methods are possible. Understanding the
internal structure of a D/A converter does assist the designer even when using standard
packages/chips.
The Pre-Lab Questions require circuit analysis to derive the values for resistors R2 and
R3 in Circuit 4-1. For this lab, use a value of 1000 Ohms for R1. This lab description
sets up two analyses of equivalent circuits for the digital values 2’b11 and 2’b00. You
will have to analyze the circuits for the remaining two values and solve a system of
equations to determine the unknown resistor values.
You can solve the system of equations manually. However, for this lab you might want
to use a Computer Algebra System (CAS). Here at UCCS we use mostly MATLAB or
Maple. At this point, you should become familiar with both software packages.
R1 = 1000 ohm
Docsity.com
pf3
pf4

Partial preview of the text

Download Two-Bit D/A Converter Lab: Designing a Two-Bit Digital-to-Analog Converter and more Study notes Computer Science in PDF only on Docsity!

Lab 4 – Two Bit D/A converter

Circuit 4-1 – A Two Bit DAC (ECE 5430 students, a four-bit DAC with an op-amp is required)

The requirement for this D/A converter is that it needs to generate at VA voltages of 0.0VS, 0.30VS, 1.0VS and a value approximately halfway between 0.30VS and 1.0VS. The value of VS is the reference voltage of the board. This midway voltage is left as a variable so that the resulting calculations have an extra degree of freedom.

Background

Typically, a D/A chip is used to convert a digital value into an analog signal. Many D/A chips use similar 2R-R ladders, although other methods are possible. Understanding the internal structure of a D/A converter does assist the designer even when using standard packages/chips.

The Pre-Lab Questions require circuit analysis to derive the values for resistors R 2 and R 3 in Circuit 4-1. For this lab, use a value of 1000 Ohms for R1. This lab description sets up two analyses of equivalent circuits for the digital values 2’b11 and 2’b00. You will have to analyze the circuits for the remaining two values and solve a system of equations to determine the unknown resistor values.

You can solve the system of equations manually. However, for this lab you might want to use a Computer Algebra System (CAS). Here at UCCS we use mostly MATLAB or Maple. At this point, you should become familiar with both software packages.

R1 = 1000 ohm

Circuit 4-2 – An Equivalent Circuit to Circuit 3-3 when port 0 =port 1 =’1’

When ports 0 and 1 are both logical “1” they set a 5V value on their respective pins. Since they have the same supply voltage and have one connection in common they appear as if they are in parallel.

2 3 1

1 R R R

R

V A

VA is required to be ≥ 4 Volts when the D/A is set to 2’b11, therefore:

2 3 1

1 ( || )

R R R

R

The port values of 2’b00 correspond to circuit that has no potential drops. Therefore, the resistors can have any value. Use Equation 3-2, along with others that you will derive to solve for R 2 and R 3.

You need to derive equivalent circuit equations for the remaining two values of ports 0 and 1. That is, when port 1 =1 and port 0 =0 (2’b10) and for 2’b01. At this point you could use Maple to solve the 3 equations for 3 unknowns. For 2’b10 let the voltage for VA be a parameter, say V 2 and let Maple tell you what values V 2 can be given the constraint 0.30<V 2 <1.0. Be sure to include a copy of the output from the CAS with your lab write- up if you use Maple or Matlab.

Note: Maple is installed on the workstations on the first floor of the Engineering & Applied Science building.

Pre-Lab Assignments for Circuit 3

  1. Read the ATMEGA16 data book..
  2. Read B, C, and O (course text), chapter 2.
  3. Complete Pre-Lab Questions on page 4-4.

Pre-Lab Questions Name: __________________________

Examine Circuit 4-1 on page 4-1 and answer the following questions. Be sure to include your work and show units, as appropriate, on your answers. 2/2/6 points each, 10 points possible.

  1. Based on the data sheet for the MEGA16, do the output ports source or sink

current?

  1. How much current can the output ports source/sink?
  2. Derive the values for R 2 and R 3 in circuit 4-1 as defined previously in the lab handout.