0.4.0 DAC8554

This commit is contained in:
Rob Tillaart 2024-01-20 13:43:39 +01:00
parent 5d22a20b4b
commit 717716cc66
14 changed files with 42 additions and 10 deletions

View File

@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.4.0] - 2024-01-20
- Fix #15, improve handling SPI dependency.
- update examples
----
## [0.3.0] - 2023-12-01
- refactor constructor interface - breaking changes.
- minimize conditional code. -- create SPI_CLASS macro to solve it.

View File

@ -2,7 +2,7 @@
// FILE: DAC8554.cpp
// AUTHOR: Rob Tillaart
// PURPOSE: Arduino library for DAC8554 SPI Digital Analog Convertor
// VERSION: 0.3.0
// VERSION: 0.4.0
// DATE: 2017-12-19
// URL: https://github.com/RobTillaart/DAC8554
@ -49,9 +49,9 @@ void DAC8554::begin()
if(_hwSPI)
{
_mySPI->end();
_mySPI->begin();
delay(1);
// _mySPI->end();
// _mySPI->begin();
// delay(1);
}
else // SOFTWARE SPI
{

View File

@ -3,7 +3,7 @@
// FILE: DAC8554.h
// AUTHOR: Rob Tillaart
// PURPOSE: Arduino library for DAC8554 SPI Digital Analog Convertor
// VERSION: 0.3.0
// VERSION: 0.4.0
// DATE: 2017-12-19
// URL: https://github.com/RobTillaart/DAC8554
//
@ -11,7 +11,7 @@
#include "Arduino.h"
#include "SPI.h"
#define DAC8554_LIB_VERSION (F("0.3.0"))
#define DAC8554_LIB_VERSION (F("0.4.0"))
#define DAC8554_POWERDOWN_NORMAL 0x00
#define DAC8554_POWERDOWN_1K 0x40

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2017-2023 Rob Tillaart
Copyright (c) 2017-2024 Rob Tillaart
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -21,6 +21,13 @@ The DAC8554 is a SPI based 16 bit DAC with four channels.
**Warning** This library is not tested extensively
#### 0.4.0 Breaking change
Version 0.4.0 introduced a breaking change to improve handling the SPI dependency.
The user has to call **SPI.begin()** or equivalent before calling **DAC.begin()**.
Optionally the user can provide parameters to the **SPI.begin(...)**
#### 0.3.0 Breaking change
The version 0.3.0 has breaking changes in the interface.

View File

@ -18,6 +18,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
}

View File

@ -7,7 +7,8 @@
#include "DAC8554.h"
// note address as param
// note address as parameter
DAC8554 DAC_A(10, &SPI, 0);
DAC8554 DAC_B(11, &SPI, 1);
@ -17,6 +18,9 @@ void setup()
Serial.begin(115200);
Serial.println(__FILE__);
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
DAC_A.begin();
DAC_B.begin();

View File

@ -7,6 +7,7 @@
#include "DAC8554.h"
DAC8554 mydac(10);
@ -17,6 +18,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
}

View File

@ -7,6 +7,7 @@
#include "DAC8554.h"
// HW SPI
DAC8554 mydac(10);
@ -23,6 +24,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
mydac.setValue(chanA, 0);

View File

@ -7,6 +7,7 @@
#include "DAC8554.h"
// HW SPI
DAC8554 mydac(10);
@ -21,6 +22,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
}

View File

@ -21,6 +21,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
}

View File

@ -18,6 +18,8 @@ void setup()
Serial.print("DAC8554_LIB_VERSION: ");
Serial.println(DAC8554_LIB_VERSION);
SPI.begin();
mydac.begin();
}

View File

@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/DAC8554"
},
"version": "0.3.0",
"version": "0.4.0",
"license": "MIT",
"frameworks": "*",
"platforms": "*",

View File

@ -1,5 +1,5 @@
name=DAC8554
version=0.3.0
version=0.4.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for DAC8534 and DAC8554 SPI Digital Analog Convertor.