-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Added drivers for Ad7190/2/3/4 and 5 2. Added example script for data capture 3. Updated index.rst and contents.m Signed-off-by: Disha D <[email protected]>
- Loading branch information
Showing
8 changed files
with
151 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
classdef Rx < adi.common.Rx & adi.common.RxTx ... | ||
& adi.AD719x.Base | ||
% AD7190 Precision ADC Class | ||
% adi.AD7190.Rx Receives data from the AD7190 ADC | ||
% The adi.AD7190.Rx System object is a signal source that can receive | ||
% data from the AD7190. | ||
% | ||
% `rx = adi.AD7190.Rx;` | ||
% `rx = adi.AD7190.Rx('serial:COM18,230400');` | ||
% | ||
% `AD7190 DataSheet<a href="https://www.analog.com/media/en/technical-documentation/data-sheets/ad7190.pdf">`_ | ||
|
||
properties (Nontunable, Hidden) | ||
channel_names = {'voltage0', 'voltage1','voltage2','voltage3'}; | ||
end | ||
|
||
methods | ||
%% Constructor | ||
function obj = Rx(varargin) | ||
obj = [email protected]('ad7190','ad7190',varargin{:}); | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
classdef Rx < adi.common.Rx & adi.common.RxTx ... | ||
& adi.AD719x.Base | ||
% AD7192 Precision ADC Class | ||
% adi.AD7192.Rx Receives data from the AD7192 ADC | ||
% The adi.AD7192.Rx System object is a signal source that can receive | ||
% data from the AD7192. | ||
% | ||
% `rx = adi.AD7192.Rx;` | ||
% `rx = adi.AD7192.Rx('serial:COM18,230400');` | ||
% | ||
% `AD7192 DataSheet<a href="https://www.analog.com/media/en/technical-documentation/data-sheets/ad7192.pdf">`_ | ||
|
||
properties (Nontunable, Hidden) | ||
channel_names = {'voltage0', 'voltage1','voltage2','voltage3'}; | ||
end | ||
|
||
methods | ||
%% Constructor | ||
function obj = Rx(varargin) | ||
obj = [email protected]('ad7192','ad7192',varargin{:}); | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
classdef Rx < adi.common.Rx & adi.common.RxTx ... | ||
& adi.AD719x.Base | ||
% AD7193 Precision ADC Class | ||
% adi.AD7193.Rx Receives data from the AD7193 ADC | ||
% The adi.AD7193.Rx System object is a signal source that can receive | ||
% data from the AD7193. | ||
% | ||
% `rx = adi.AD7193.Rx;` | ||
% `rx = adi.AD7193.Rx('serial:COM18,230400');` | ||
% | ||
% `AD7193 Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/ad7193.pdf>`_ | ||
|
||
properties (Nontunable, Hidden) | ||
channel_names = {'voltage0', 'voltage1','voltage2','voltage3','voltage4','voltage5','voltage6','voltage7'}; | ||
end | ||
|
||
methods | ||
%% Constructor | ||
function obj = Rx(varargin) | ||
obj = [email protected]('ad7193','ad7193',varargin{:}); | ||
end | ||
end | ||
|
||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
classdef Rx < adi.common.Rx & adi.common.RxTx ... | ||
& adi.AD719x.Base | ||
% AD7194 Precision ADC Class | ||
% adi.AD7194.Rx Receives data from the AD7194 ADC | ||
% The adi.AD7194.Rx System object is a signal source that can receive | ||
% data from the AD7194. | ||
% | ||
% `rx = adi.AD7194.Rx;` | ||
% `rx = adi.AD7194.Rx('serial:COM18,230400');` | ||
% | ||
% `AD7194 Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/ad7194.pdf>`_ | ||
|
||
properties (Nontunable, Hidden) | ||
channel_names = {'voltage0', 'voltage1','voltage2','voltage3','voltage4','voltage5','voltage6','voltage7','voltage8','voltage9','voltage10','voltage11','voltage12','voltage13','voltage14','voltage15'}; | ||
end | ||
|
||
methods | ||
%% Constructor | ||
function obj = Rx(varargin) | ||
obj = [email protected]('ad7194','ad7194',varargin{:}); | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
classdef Rx < adi.common.Rx & adi.common.RxTx ... | ||
& adi.AD719x.Base | ||
% AD7195 Precision ADC Class | ||
% adi.AD7195.Rx Receives data from the AD7195 ADC | ||
% The adi.AD7195.Rx System object is a signal source that can receive | ||
% data from the AD7195. | ||
% | ||
% `rx = adi.AD7195.Rx;` | ||
% `rx = adi.AD7195.Rx('serial:COM18,230400');` | ||
% | ||
% `AD7195 Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/ad7195.pdf>`_ | ||
|
||
properties (Nontunable, Hidden) | ||
channel_names = {'voltage0', 'voltage1','voltage2','voltage3'}; | ||
end | ||
|
||
methods | ||
%% Constructor | ||
function obj = Rx(varargin) | ||
obj = [email protected]('ad7195','ad7195',varargin{:}); | ||
end | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
%% Script for capturing and displaying a continuous set of samples from a | ||
%% connected AD719x board | ||
|
||
% Instantiate the system object | ||
rx = adi.AD7193.Rx(); | ||
rx.uri = 'serial:COM12,230400,8n1n'; | ||
|
||
% Samples per frame cannot exceed 500 if all 16 channels need to be captured on ad7194 | ||
rx.SamplesPerFrame = 400; | ||
rx.EnabledChannels = [1]; | ||
|
||
% 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); |