Skip to content

YOUASSBEE/DAC80504

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DAC80501 Arduino Library

GitHub version License donate

This is a library for the TI DAC80501 16bit digital analog converter (until now only the SPI bus connection is supported by this lib)

Helpful Infos

https://e2e.ti.com/support/data-converters-group/data-converters/f/data-converters-forum/968246/dac80501-spi

https://www.ti.com/product/DAC80501

Author

Jürgen Goldmann

Licence

Licensed under the European Union Public License (EUPL)-1.2-or-later

Why licensed under EUPL-1.2: it is compatible to GPL and compatible to EU-rights and regulations

Compare different licences

Download and Installation

To download click the DOWNLOAD ZIP button, rename the uncompressed folder Dac80501. Check that the Dac80501 folder contains DAC80501.cpp and DAC80501.h

Arduino IDE

Place the Dac80501 library folder your arduinosketchfolder/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

Platform IO

Add in 'platform.ini' (no need to download before)

lib_deps =
  https://github.com/raibisch/dac80501

Remark for Software-Design

MOSI signal was not used, because of one way data transfer from slave to master, but defined as 'dummy' pin in CPU. Tested with ESP32, ESP-S2 and ESP-S3 - may also (not tested) work with other arduino CPUs

Define

DAC80501 dac;

Init

// default clock=2MHz
dac.setClockSpeed(10000000); // 10MHz
dac.begin(&SPI,SPI1_SCK,SPI1_MISO,SPI1_MOSI,SPI1_CS);
// default div=2 gain=1
dac.setREG4_DivGain(SET4_DIV2,SET4_GAIN2);

Write Value to DAC

 dac.writeDAC(0xffff);

Remark for Hardware-Design

In some cases the spi data transfer does not work. I have good results with a 330 Ohm resistor in the 'SCLK' and 'MISO' (and CS) line to reduce signal reflections.

About

Library for the DAC80504 16 bit 4 channel digital to analog converter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 100.0%