Documentation for aadc (SPASS).

Asynchronous Analog to Digital Conversion


Description

The function aadc simulates an Asynchronous Analog to Digital Converter. It transform an uniform oversampled signal into a non uniform signal thanks to a level crossing selection of samples.

Usage

nu = aadc(adc,u)

Arguments

adc Analog to Digital Converter.
u Uniform signal.

Values

nu Non Uniform signal.

See Also

Example

% Creation of a uniform signal

  f = 1;           % signal frequency
  t = 10/f;        % signal duration
  fs = 1000;       % sampling frequency
  ts = 1/fs;       % sampling time
  times = ts:ts:t; % time samples
  a = 0.45;        % signal amplitude

  ampl = a*sin(2*pi*f*times)+a*sin(4*2*pi*f*times)+0.9;   
  u = uinit(ampl,ts,ts);                 % uniform signal
  
% ADC definition

  nbit = 4;        % AADC resolution
  vmin = 0;        % AADC power supply minimum voltage
  vmax = 1.8;      % AADC power supply maximum voltage
  adc = adcinit(nbit,vmin,vmax)
  
% Asynchronous analog to digital conversion

  nu = aadc(adc,u);

% Plot result

  plot(times,ampl,'k','LineWidth',1)
  hold on
  plot(delay2time(nu.delay),nu.ampl,'r*')
  hold off