SAR ADC

N-bit successive approximation register (SAR) based ADC

  • Library:
  • Mixed-Signal Blockset / ADC / Architectures

Description

Successive Approximation Register (SAR) based ADC consists of a sample and hold circuit (SHA), a comparator, an internal digital to analog converter (DAC), and a successive approximation register.

When the ADC receives the start command, SHA is placed in hold mode. The most significant bit (MSB) of the SAR is set to logic 1, and all other bits are set to logic 0.

The output of the SAR is fed back to a DAC, whose output is compared with the incoming input signal. If the DAC output is greater than the analog input, MSB is reset, otherwise it is left set. The next MSB is now set to 1, and the process is repeated until every bit the SAR is compared. The final value of the SAR at the end of this process corresponds to the analog input value. The end of the conversion process is indicated by the ready signal.

Ports

Input

expand all

Analog input signal, specified as a scalar or vector.

Data Types: double

External conversion start clock, specified as a scalar or vector. start determines when the analog to digital conversion process starts.

Data Types: double

Output

expand all

Converted digital output signal, returned as a scalar or vector.

Data Types: fixed point | single | double | uint8 | uint16 | uint32 | Boolean

Determines whether ADC conversion is complete, returned as a scalar or vector.

Data Types: single | double | uint8 | uint16 | uint32 | fixed point

Parameters

expand all

Configuration

Number of physical output bits, specified as a unitless scalar. Number of bits determines the resolution of the ADC.

Programmatic Use

  • Use get_param(gcb,'NBits') to view the current Number of bits.

  • Use set_param(gcb,'NBits',value) to set Number of bits to a specific value.

ADC dynamic range, specified as a vector in V.

Programmatic Use

  • Use get_param(gcb,'InputRange') to view the current Input range.

  • Use set_param(gcb,'InputRange',value) to set Input range to a specific value.

Select the output data type of the SAR ADC.

Select to connect to an external start conversion clock. By default, this option is selected. If you deselect this option, a Sampling Clock Source block inside the SAR ADC is used to generate the start conversion clock.

Frequency of internal start conversion clock, specified as a scalar in Hz. Conversion start frequency determines the rate of the ADC.

Dependencies

This parameter is only available when Use external start clock is not selected.

Programmatic Use

  • Use get_param(gcb,'StartFreq') to view the current value of Conversion start frequency.

  • Use set_param(gcb,'StartFreq',value) to set Conversion start frequency to a specific value.

RMS aperture jitter added as an impairment to the start conversion clock, specified as a real nonnegative scalar in s. Set RMS aperture jitter value to zero if you want a clean clock signal.

Dependencies

This parameter is only available when Use external start clock is not selected.

Programmatic Use

  • Use get_param(gcb,'StartClkJitter') to view the current value of RMS aperture jitter.

  • Use set_param(gcb,'StartClkJitter',value) to set RMS aperture jitter to a specific value.

Frequency of SAR clock, specified as a scalar in Hz. SAR Frequency must be greater than the value of the Conversion start frequency multiplied by the Number of bits.

Programmatic Use

  • Use get_param(gcb,'SARFreq') to view the current value of Frequency.

  • Use set_param(gcb,'SARFreq',value) to set Frequency to a specific value.

Data Types: double

Defines ADC output data type.

Programmatic Use

  • Use get_param(gcb,'OutDataType') to view the current ADC output data type.

  • Use set_param(gcb,'OutDataType',value) to set ADC output data type to a specific value.

Impairments

Select to enable impairments in ADC simulation. By default, this option is selected.

Shifts quantization steps by specific value, specified as a real scalar in least significant bit (LSB).

Dependencies

This parameter is only available when Enable impairments is selected.

Programmatic Use

  • Use get_param(gcb,'OffsetError') to view the current value of Offset error.

  • Use set_param(gcb,'OffsetError',value) to set Offset error to a specific value.

Error on the slope of the straight line interpolating ADC transfer curve, specified as a scalar in LSB or %.

Dependencies

This parameter is only available when Enable impairments is selected.

Programmatic Use

  • Use get_param(gcb,'GainError') to view the current value of Gain error.

  • Use set_param(gcb,'GainError',value) to set Gain error to a specific value.

Introduced in R2019a