diff --git a/+adi/+AD4052/Rx.m b/+adi/+AD4052/Rx.m index d3990aad..4fde25cd 100644 --- a/+adi/+AD4052/Rx.m +++ b/+adi/+AD4052/Rx.m @@ -10,7 +10,7 @@ % `rx = adi.AD4052.Rx;` % `rx = adi.AD4052.Rx('uri','serial:COM5,230400');` % - % `AD4052 Datasheet `_ + % `AD4052 Datasheet `_ properties (Nontunable, Hidden, Constant) Type = 'Rx' diff --git a/+adi/+AD4060/Rx.m b/+adi/+AD4060/Rx.m new file mode 100644 index 00000000..1520d123 --- /dev/null +++ b/+adi/+AD4060/Rx.m @@ -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 `_ + + 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 \ No newline at end of file diff --git a/+adi/+AD4062/Rx.m b/+adi/+AD4062/Rx.m new file mode 100644 index 00000000..66c405de --- /dev/null +++ b/+adi/+AD4062/Rx.m @@ -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 `_ + + 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 \ No newline at end of file diff --git a/+adi/Contents.m b/+adi/Contents.m index dc865e5f..96c4a9f2 100644 --- a/+adi/Contents.m +++ b/+adi/Contents.m @@ -22,6 +22,8 @@ % AD4030-24 - ADC % AD4050 - ADC % AD4052 - ADC +% AD4060 - ADC +% AD4062 - ADC % AD4630-16 - ADC % AD4630-24 - ADC % AD4170 - ADC diff --git a/CI/gen_doc/docs/gen_sysobj_doc.m b/CI/gen_doc/docs/gen_sysobj_doc.m index 7aee5f82..181f2236 100644 --- a/CI/gen_doc/docs/gen_sysobj_doc.m +++ b/CI/gen_doc/docs/gen_sysobj_doc.m @@ -36,6 +36,8 @@ , {'AD4020', {'Rx'}}... , {'AD4021', {'Rx'}}... , {'AD4022', {'Rx'}}... + , {'AD4060', {'Rx'}}... + , {'AD4062', {'Rx'}}... , {'AD4170', {'Rx'}}... , {'AD4190', {'Rx'}}... , {'AD5760', {'Tx'}}... diff --git a/docs/source/index.rst b/docs/source/index.rst index 5a69374f..f5a76c25 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -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)" diff --git a/examples/ad4060_DataCapture.m b/examples/ad4060_DataCapture.m new file mode 100644 index 00000000..dc4746a6 --- /dev/null +++ b/examples/ad4060_DataCapture.m @@ -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); \ No newline at end of file diff --git a/examples/ad4062_DataCapture.m b/examples/ad4062_DataCapture.m new file mode 100644 index 00000000..419df151 --- /dev/null +++ b/examples/ad4062_DataCapture.m @@ -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); \ No newline at end of file