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
5 changes: 5 additions & 0 deletions boards/shields/adafruit_ad5693r/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Jonas Berg
# SPDX-License-Identifier: Apache-2.0

config SHIELD_ADAFRUIT_AD5693R
def_bool $(shields_list_contains,adafruit_ad5693r)
24 changes: 24 additions & 0 deletions boards/shields/adafruit_ad5693r/adafruit_ad5693r.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2025 Jonas Berg
*
* SPDX-License-Identifier: Apache-2.0
*/

/ {
zephyr,user {
dac = <&dac_adafruit_ad5693r>;
dac-channel-id = <0>;
dac-resolution = <16>;
};
};

&zephyr_i2c {
status = "okay";

dac_adafruit_ad5693r: dac@4c {
status = "okay";
compatible = "adi,ad5693";
reg = <0x4c>;
#io-channel-cells = <1>;
};
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
73 changes: 73 additions & 0 deletions boards/shields/adafruit_ad5693r/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
.. _adafruit_ad5693r:

Adafruit AD5693R DAC Shield
###########################

Overview
********

The `Adafruit AD5693R DAC Shield`_ features an `Analog Devices AD5693R 16-bit DAC`_ and
two STEMMA QT connectors. It has an output span of 2.5 Volt.

.. figure:: adafruit_ad5693r.webp
:align: center
:alt: Adafruit AD5693R DAC Shield

Adafruit AD5693R DAC Shield (Credit: Adafruit)


Requirements
************

This shield can be used with boards which provide an I2C connector, for
example STEMMA QT or Qwiic connectors.
The target board must define a ``zephyr_i2c`` node label.
See :ref:`shields` for more details.


Pin Assignments
===============

+--------------+-------------------------------+
| Shield Pin | Function |
+==============+===============================+
| SDA | AD5693R I2C SDA |
+--------------+-------------------------------+
| SCL | AD5693R I2C SCL |
+--------------+-------------------------------+
| A0 | AD5693R I2C address selection |
+--------------+-------------------------------+
| VREF | AD5693R reference voltage out |
+--------------+-------------------------------+
| LDAC | AD5693R Load DAC input |
+--------------+-------------------------------+

When using this shield via the STEMMA QT connector, the supply voltage is 3.3 Volt, so the
maximum output voltage is 2.5 Volt.

The LDAC pin is pulled down on the shield, forcing an updated output voltage as soon as
the input register has been written.

See :dtcompatible:`adi,ad5693` for documentation on how to adjust the
devicetree file, for example to adjust the power-down mode.


Programming
***********

Set ``--shield adafruit_ad5693r`` when you invoke ``west build``. For example
when running the :zephyr:code-sample:`dac` sample:

.. zephyr-app-commands::
:zephyr-app: samples/drivers/dac
:board: adafruit_feather_rp2040
:shield: adafruit_ad5693r
:goals: build flash

Connect a voltmeter to the shield output and observe how the voltage changes.

.. _Adafruit AD5693R DAC Shield:
https://learn.adafruit.com/adafruit-ad5693r-16-bit-dac-breakout-board

.. _Analog Devices AD5693R 16-bit DAC:
https://www.analog.com/en/products/ad5693r.html
10 changes: 10 additions & 0 deletions boards/shields/adafruit_ad5693r/shield.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) 2025, Jonas Berg

shield:
name: adafruit_ad5693r
full_name: Adafruit AD5693R DAC Shield
vendor: adafruit
supported_features:
- dac
18 changes: 12 additions & 6 deletions samples/drivers/dac/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
sample:
name: DAC driver sample
common:
tags: DAC
harness: console
harness_config:
type: one_line
regex:
- Generating sawtooth signal at DAC channel ([0-9]*).
tests:
sample.drivers.dac:
tags: DAC
depends_on: dac
filter: CONFIG_DAC_SAMPLE_RUN
integration_platforms:
- nucleo_l152re
harness: console
harness_config:
type: one_line
regex:
- Generating sawtooth signal at DAC channel ([0-9]*).
sample.drivers.dac.shields:
platform_allow:
- adafruit_feather_rp2040/rp2040
extra_args:
- platform:adafruit_feather_rp2040/rp2040:SHIELD="adafruit_ad5693r"