0.3.0 AD5680

This commit is contained in:
Rob Tillaart 2024-01-19 13:46:03 +01:00
parent 7b788d715d
commit 43390bea53
11 changed files with 33 additions and 12 deletions

View File

@ -1,7 +1,7 @@
//
// FILE: AD5680.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.1
// VERSION: 0.3.0
// DATE: 2023-09-19
// PURPOSE: Arduino library for AD5680 Digital Analog Convertor (18 bit).
@ -41,9 +41,9 @@ void AD5680::begin()
if(_hwSPI)
{
_mySPI->end();
_mySPI->begin();
delay(1);
// _mySPI->end();
// _mySPI->begin();
// delay(1);
}
else // SOFTWARE SPI
{

View File

@ -2,7 +2,7 @@
//
// FILE: AD5680.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.1
// VERSION: 0.3.0
// DATE: 2023-09-19
// PURPOSE: Arduino library for AD5680 Digital Analog Convertor (18 bit).
@ -10,7 +10,7 @@
#include "Arduino.h"
#include "SPI.h"
#define AD5680_LIB_VERSION (F("0.2.1"))
#define AD5680_LIB_VERSION (F("0.3.0"))
#ifndef __SPI_CLASS__
#if defined(ARDUINO_ARCH_RP2040)

View File

@ -6,12 +6,17 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.3.0] - 2024-01-19
- Fix #7, improve handling SPI dependency.
----
## [0.2.1] - 2024-01-02
- fix examples
- add __SPI_CLASS__ guard
- minor edits
## [0.2.0] - 2023-11-26
- refactor constructor interface - breaking changes.
- minimize conditional code. -- create SPI_CLASS macro to solve it.

View File

@ -28,6 +28,13 @@ Feedback, issues, improvements are welcome.
Please file an issue on GitHub.
#### 0.3.0 Breaking change
Version 0.3.0 introduced a breaking change to improve handling the SPI dependency.
The user has to call **SPI.begin()** or equivalent before calling **AD.begin()**.
Optionally the user can provide parameters to the **SPI.begin(...)**
#### 0.2.0 breaking change
The version 0.2.0 has breaking changes in the interface.

View File

@ -4,7 +4,7 @@
// PURPOSE: test basic behaviour and performance
// URL: https://github.com/RobTillaart/AD5680
#include "SPI.h"
#include "AD5680.h"
@ -20,6 +20,7 @@ void setup()
Serial.print("AD5680_LIB_VERSION: ");
Serial.println(AD5680_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -5,7 +5,6 @@
// URL: https://github.com/RobTillaart/AD5680
#include "SPI.h"
#include "AD5680.h"
@ -29,6 +28,7 @@ void setup()
Serial.print("AD5680_LIB_VERSION: ");
Serial.println(AD5680_LIB_VERSION);
myspi->begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -7,12 +7,14 @@
#include "AD5680.h"
AD5680 AD16_HW(8, &SPI);
AD5680 AD16_SW(5, 6, 7);
float frequency = 50;
float amplitude = 262144; // 18 bits
void setup()
{
Serial.begin(115200);
@ -21,6 +23,7 @@ void setup()
Serial.print("AD5680_LIB_VERSION: ");
Serial.println(AD5680_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -7,6 +7,7 @@
#include "AD5680.h"
AD5680 AD16_HW(8, &SPI);
AD5680 AD16_SW(5, 6, 7);
@ -21,6 +22,7 @@ void setup()
Serial.print("AD5680_LIB_VERSION: ");
Serial.println(AD5680_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();

View File

@ -7,12 +7,14 @@
#include "AD5680.h"
AD5680 AD16_HW(8, &SPI);
AD5680 AD16_SW(5, 6, 7);
float frequency = 1.0;
float amplitude = 262144; // 18 bits
void setup()
{
Serial.begin(115200);
@ -21,6 +23,7 @@ void setup()
Serial.print("AD5680_LIB_VERSION: ");
Serial.println(AD5680_LIB_VERSION);
SPI.begin();
AD16_HW.begin();
AD16_SW.begin();

View File

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

View File

@ -1,5 +1,5 @@
name=AD5680
version=0.2.1
version=0.3.0
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for AD5680 Digital Analog Convertor (18 bit).