nanoFramework.Iot.Device.AD5328 1.2.952

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package nanoFramework.Iot.Device.AD5328 --version 1.2.952
                    
NuGet\Install-Package nanoFramework.Iot.Device.AD5328 -Version 1.2.952
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.AD5328" Version="1.2.952" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.AD5328" Version="1.2.952" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.AD5328" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.AD5328 --version 1.2.952
                    
#r "nuget: nanoFramework.Iot.Device.AD5328, 1.2.952"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.AD5328@1.2.952
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.AD5328&version=1.2.952
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.AD5328&version=1.2.952
                    
Install as a Cake Tool

AD5328 - Digital to Analog Convertor

AD5328 is an Digital-to-Analog converter (DAC) with 12 bits of resolution.

Documentation

Product information and documentation can he found here

Usage

Important: make sure you properly setup the SPI pins especially for ESP32 before creating the SpiDevice, make sure you install the nanoFramework.Hardware.ESP32 nuget:

//////////////////////////////////////////////////////////////////////
// when connecting to an ESP32 device, need to configure the SPI GPIOs
// used for the bus
Configuration.SetPinFunction(21, DeviceFunction.SPI1_MOSI);
Configuration.SetPinFunction(22, DeviceFunction.SPI1_MISO);
Configuration.SetPinFunction(23, DeviceFunction.SPI1_CLOCK);
// Make sure as well you are using the right chip select

For other devices like STM32, please make sure you're using the preset pins for the SPI bus you want to use. The chip select can as well be pre setup.

using System.Device.Spi;
using System.Threading;
using Iot.Device.DAC;
using UnitsNet;

var spisettings = new SpiConnectionSettings(1, 42)
{
    Mode = SpiMode.Mode2
};

var spidev = SpiDevice.Create(spisettings);
var dac = new AD5328(spidev, ElectricPotential.FromVolts(2.5), ElectricPotential.FromVolts(2.5));
Thread.Sleep(1000);
dac.SetVoltage(0, ElectricPotential.FromVolts(1));
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.73 33 5/20/2026
2.0.0-preview.69 44 5/18/2026
2.0.0-preview.62 48 5/13/2026
2.0.0-preview.49 48 5/4/2026
2.0.0-preview.45 55 4/29/2026
2.0.0-preview.37 52 4/22/2026
2.0.0-preview.32 52 4/20/2026
2.0.0-preview.16 59 3/10/2026
1.2.952 127 3/4/2026
1.2.931 307 11/10/2025
1.2.907 259 10/2/2025
1.2.889 241 7/28/2025
1.2.869 356 4/2/2025
1.2.864 323 4/2/2025
1.2.852 351 3/11/2025
1.2.846 349 3/10/2025
1.2.822 257 2/26/2025
1.2.776 301 2/4/2025
1.2.775 292 2/4/2025
1.2.772 281 2/4/2025
Loading failed