mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.4.0 AD9833
This commit is contained in:
parent
a8d0b7d8d7
commit
0ba51433c8
@ -2,7 +2,7 @@
|
||||
// FILE: AD9833.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: Arduino library for AD9833 function generator
|
||||
// VERSION: 0.3.1
|
||||
// VERSION: 0.4.0
|
||||
// URL: https://github.com/RobTillaart/AD9833
|
||||
//
|
||||
|
||||
@ -58,8 +58,8 @@ void AD9833::begin()
|
||||
|
||||
if (_hwSPI)
|
||||
{
|
||||
_mySPI->end();
|
||||
_mySPI->begin();
|
||||
// _mySPI->end();
|
||||
// _mySPI->begin();
|
||||
}
|
||||
else // SOFTWARE SPI
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
// FILE: AD9833.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: Arduino library for AD9833 function generator.
|
||||
// VERSION: 0.3.1
|
||||
// VERSION: 0.4.0
|
||||
// URL: https://github.com/RobTillaart/AD9833
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "SPI.h"
|
||||
|
||||
|
||||
#define AD9833_LIB_VERSION (F("0.3.1"))
|
||||
#define AD9833_LIB_VERSION (F("0.4.0"))
|
||||
|
||||
|
||||
#if !defined(__SPI_CLASS__)
|
||||
|
@ -6,13 +6,18 @@ 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 #14, improve handling SPI dependency.
|
||||
- update examples
|
||||
|
||||
----
|
||||
|
||||
## [0.3.1] - 2024-01-12
|
||||
- Fix #12, make crystal adjustable (experimental implementation).
|
||||
- add **bool setCrystalFrequency(uint32_t crystal = 25000000)**
|
||||
- add **uint32_t getCrystalFrequency()**
|
||||
- update readme.md
|
||||
|
||||
|
||||
## [0.3.0] - 2023-11-26
|
||||
- fix #10, explicit write control register fixes glitch.
|
||||
- rename **writeFreqRegister()** to **writeFrequencyRegister()**
|
||||
|
@ -59,6 +59,13 @@ please let me know by opening an issue.
|
||||
Probably they need a dedicated library based on this one.
|
||||
|
||||
|
||||
#### 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 **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.
|
||||
|
@ -17,6 +17,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
|
||||
AD.setWave(AD9833_SQUARE1);
|
||||
|
@ -15,6 +15,8 @@ void setup()
|
||||
while(!Serial);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
AD.setFrequency(1000, 0);
|
||||
AD.setFrequency(1000, 0);
|
||||
|
@ -16,6 +16,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
AD.setFrequency(1000, 0); // 1000 Hz.
|
||||
|
||||
|
@ -24,6 +24,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
myspi->begin();
|
||||
|
||||
AD.begin();
|
||||
AD.setFrequency(1000, 0); // 1000 Hz.
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: demo AD9833 wave form generator on 4 devices
|
||||
//
|
||||
// todo: test with hardware
|
||||
// TODO: test with hardware
|
||||
|
||||
#include "AD9833.h"
|
||||
|
||||
@ -23,6 +23,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
AD[i].begin();
|
||||
|
@ -7,6 +7,7 @@
|
||||
|
||||
#include "AD9833.h"
|
||||
|
||||
|
||||
// ESP32
|
||||
// SPIClass * myspi = new SPIClass(VSPI);
|
||||
// AD9833 AD(5, myspi);
|
||||
@ -27,6 +28,8 @@ void setup()
|
||||
Serial.println(AD9833_LIB_VERSION);
|
||||
delay(10);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
|
||||
Serial.print("hardware:\t");
|
||||
|
@ -18,6 +18,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
|
||||
AD.setWave(AD9833_SINE);
|
||||
|
@ -18,6 +18,8 @@ void setup()
|
||||
Serial.begin(115200);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
|
||||
AD.setWave(AD9833_SINE);
|
||||
|
@ -15,6 +15,8 @@ void setup()
|
||||
while(!Serial);
|
||||
Serial.println(__FILE__);
|
||||
|
||||
SPI.begin();
|
||||
|
||||
AD.begin();
|
||||
AD.setFrequency(1000, 0);
|
||||
AD.setFrequency(1000, 0);
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/AD9833.git"
|
||||
},
|
||||
"version": "0.3.1",
|
||||
"version": "0.4.0",
|
||||
"license": "MIT",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=AD9833
|
||||
version=0.3.1
|
||||
version=0.4.0
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for AD9833 function generator. Supports hardware SPI and software SPI.
|
||||
|
Loading…
Reference in New Issue
Block a user