# Overview

In this laboratory we will simulate an ADC DAC set up with ramp and sine test.

• Simulation and analysis of a ramp signal: DNL, INL, LSB
• Simulation and analysis of a sine signal: FFT, DNL, INL, SNR

# ADC DAC Schematic and Simulation Graph

The schematic shows a 4-bit ADC DAC simulation set up.
Simulate a ramp test.

We have input voltage V2 which is a SINE signal containing 0.5V offset,
0.5V amplitude and 16784.66796875 Hz frequency.
There is also a clock signal for ADC and DAC with 10ns sample rate.
Input Voltage: V2 in1 0 SINE(0.5 0.5 16784.66796875)


# FFT of 4bit ADC and DAC:

From the FFT Simulation it is visible that our output signal has more noise than input signal.

# Ramp Test

If we want to use a circuit for a ramp we need a voltage source.
The voltage source V1 connected between in1 and ground.
The Ramp Voltage source V1 is given below:
V1 in1 0 PULSE(0 1 0 655.36u 655.36u 0 1310.72u)

After doing simulation of the Ramp signal I got the below graph.

From this graph it is observable that there are 16 steps in this curve and the step size is fixed. Now for data analysis we need to do filtering. By using a java script tool we can do this.
In this case I went to Read Raw File to extract our LTSpice data so thst we can do this filtering.
This java script can read a LTSpice RAW file and filter the output with a certain time step. To do this filtering I selected below datum:
Start Time: 0
Stop Time : 655.36E-6
Time Step : 40.96E-6

There are 16 steps on the graph and our simulation time is 655.36E-6. So the time step is 40.96E-6.

Expected Values:

DAC INL,DNL Analysis:

For ADC Histogram test we need more time steps and in this case I used 5.12E-6s. Now reload the Raw file again.

For SINE Signal: First we need to disable the ramp signal and active the SINE Signal in order to analyse the Histogram test for ADC. Then again reload the Raw file to extract the data.

Now after taking the values (input values) from sg table we can do FFT analysis for the SINE signal.
FFT Analysis:

The above signal is 10 bit. After calculating the SNR (range) I found 4 bit signal.
Here is the Graph: