diff --git a/modules/module_3_8_bit_SAR_ADC/part_4_SAR_ADC/sar_adc.md b/modules/module_3_8_bit_SAR_ADC/part_4_SAR_ADC/sar_adc.md index 984390f2..7fab934e 100644 --- a/modules/module_3_8_bit_SAR_ADC/part_4_SAR_ADC/sar_adc.md +++ b/modules/module_3_8_bit_SAR_ADC/part_4_SAR_ADC/sar_adc.md @@ -20,7 +20,7 @@ Before diving into the full ADC schematic, it's essential to check whether the S In this example, the wiring looks like this:

- +

@@ -30,7 +30,7 @@ Notice that the output numbering is reversed for B and BN because the first bit Next, we import the bootstrap switch, comparator, and C-DAC, which will form the core of the ADC. These components are implemented as follows:

- +

The labeling can be done in any way that suits your design preferences. @@ -39,7 +39,7 @@ The labeling can be done in any way that suits your design preferences. Now, we connect the switch bank to the C-DAC and label it according to the outputs from the SAR algorithm. The wiring setup is shown below:

- +

## Defining Signals and Biasing @@ -84,12 +84,12 @@ value=0.4 These signals are configured as shown below:

- +

To generate the clock for the algorithm, we use a NAND gate connected to the output of the comparator. This creates a "valid" signal when one output is high and the other is low. The connection is as follows:

- +

## Code Blocks @@ -175,16 +175,16 @@ Below, the clock waveforms are shown. As seen, the sampling phase ends when `clk After the 8th comparison (i.e., once all bits are resolved), the `DAC_clk` signal is triggered. This clock is later used in post-processing when an ideal DAC is implemented in Python.

- +

- +

Looking at the voltage across the C-DAC during the conversion phase, we observe the following waveform:

- +

This confirms that the SAR conversion is functioning correctly. @@ -266,7 +266,7 @@ you will find a Jupyter Notebook that loads this data and reconstructs the analo When the `bit_data.txt` is imported, the dataframe looks as follows:

- +

### The `virtual_dac()` Function @@ -326,12 +326,12 @@ def virtual_dac(df, vmin=-1.2, vmax=1.2, vdd=1.2, vss=0.0, If the Ngspice simulation was successful, the `vin_diff` plot should look like:

- +

And the reconstructed output from the ideal DAC will appear as:

- +

## Conclusion