Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion +adi/+AD4052/Rx.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
% `rx = adi.AD4052.Rx;`
% `rx = adi.AD4052.Rx('uri','serial:COM5,230400');`
%
% `AD4052 Datasheet <http://www.analog.com/media/en/technical-documentation/data-sheets/AD4052.pdf>`_
% `AD4052 Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/ad4052-ad4058.pdf>`_

properties (Nontunable, Hidden, Constant)
Type = 'Rx'
Expand Down
39 changes: 39 additions & 0 deletions +adi/+AD4060/Rx.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
classdef Rx < adi.common.Rx & adi.common.RxTx ...
& adi.AD405x.Base

% AD4060 Precision ADC Class
%
% adi.AD4060.Rx Receive data from the AD4060 ADC
% The adi.AD4060.Rx System object is a signal source that can receive
% data from the AD4060.
%
% `rx = adi.AD4060.Rx;`
% `rx = adi.AD4060.Rx('uri','serial:COM5,230400');`
%
% `AD4060 Datasheet <http://www.analog.com/media/en/technical-documentation/data-sheets/AD4060.pdf>`_

properties (Nontunable, Hidden, Constant)
Type = 'Rx'
end

properties (Hidden)
Timeout = Inf
kernelBuffersCount = 1
dataTypeStr = 'int32'
phyDevName = 'ad4060'
devName = 'ad4060'
end

methods
%% Constructor

function obj = Rx(Args)
arguments
Args.uri
end
coder.allowpcode('plain');
obj = obj@adi.AD405x.Base('devName', 'ad4060', 'phyDevName', 'ad4060', 'uri', Args.uri);
end

end
end
39 changes: 39 additions & 0 deletions +adi/+AD4062/Rx.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
classdef Rx < adi.common.Rx & adi.common.RxTx ...
& adi.AD405x.Base

% AD4062 Precision ADC Class
%
% adi.AD4062.Rx Receive data from the AD4062 ADC
% The adi.AD4062.Rx System object is a signal source that can receive
% data from the AD4062.
%
% `rx = adi.AD4062.Rx;`
% `rx = adi.AD4062.Rx('uri','serial:COM5,230400');`
%
% `AD4062 Datasheet <http://www.analog.com/media/en/technical-documentation/data-sheets/AD4062.pdf>`_

properties (Nontunable, Hidden, Constant)
Type = 'Rx'
end

properties (Hidden)
Timeout = Inf
kernelBuffersCount = 1
dataTypeStr = 'int32'
phyDevName = 'ad4062'
devName = 'ad4062'
end

methods
%% Constructor

function obj = Rx(Args)
arguments
Args.uri
end
coder.allowpcode('plain');
obj = obj@adi.AD405x.Base('devName', 'ad4062', 'phyDevName', 'ad4062', 'uri', Args.uri);
end

end
end
2 changes: 2 additions & 0 deletions +adi/Contents.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
% <a href="matlab:help adi.AD4030 ">AD4030-24</a> - ADC
% <a href="matlab:help adi.AD4050 ">AD4050</a> - ADC
% <a href="matlab:help adi.AD4052 ">AD4052</a> - ADC
% <a href="matlab:help adi.AD4060 ">AD4060</a> - ADC
% <a href="matlab:help adi.AD4062 ">AD4062</a> - ADC
% <a href="matlab:help adi.AD4630_16 ">AD4630-16</a> - ADC
% <a href="matlab:help adi.AD4630_24 ">AD4630-24</a> - ADC
% <a href="matlab:help adi.AD4170 ">AD4170</a> - ADC
Expand Down
2 changes: 2 additions & 0 deletions CI/gen_doc/docs/gen_sysobj_doc.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
, {'AD4020', {'Rx'}}...
, {'AD4021', {'Rx'}}...
, {'AD4022', {'Rx'}}...
, {'AD4060', {'Rx'}}...
, {'AD4062', {'Rx'}}...
, {'AD4170', {'Rx'}}...
, {'AD4190', {'Rx'}}...
, {'AD5760', {'Tx'}}...
Expand Down
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ The following have device-specific implementations in MATLAB and Simulink. In ge
"AD3530r", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD4050", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD4052", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD4060", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD4062", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD4170", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD7190", "SDP-K1", "Yes", "No", "ADI (2021b)"
"AD7192", "SDP-K1", "Yes", "No", "ADI (2021b)"
Expand Down
23 changes: 23 additions & 0 deletions examples/ad4060_DataCapture.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%% Script for capturing and displaying a continuous set of samples from a
%% connected AD4060 board

% Instantiate the system object
rx = adi.AD4060.Rx('uri', 'serial:COM8,230400');
rx.SamplesPerFrame = 400;
rx.EnabledChannels = [1];

rx.SampleRate = 62500; % In sample mode, the sampling rate can be as high as 140KSPS

% Capture data
data = rx();

enabledChannels = size(data, 2);
figure(1);
for i = 1:enabledChannels
subplot(enabledChannels, 1, i);
plot(data(1:rx.SamplesPerFrame, i));
title("Channel " + num2str(rx.EnabledChannels(i)));
end

% Delete the system object
release(rx);
23 changes: 23 additions & 0 deletions examples/ad4062_DataCapture.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
%% Script for capturing and displaying a continuous set of samples from a
%% connected AD4062 board

% Instantiate the system object
rx = adi.AD4062.Rx('uri', 'serial:COM8,230400');
rx.SamplesPerFrame = 400;
rx.EnabledChannels = [1];

rx.SampleRate = 62500; % In sample mode, the sampling rate can be as high as 140KSPS

% Capture data
data = rx();

enabledChannels = size(data, 2);
figure(1);
for i = 1:enabledChannels
subplot(enabledChannels, 1, i);
plot(data(1:rx.SamplesPerFrame, i));
title("Channel " + num2str(rx.EnabledChannels(i)));
end

% Delete the system object
release(rx);