0.2.1 AD56X8

This commit is contained in:
Rob Tillaart 2024-01-02 13:59:28 +01:00
parent b9559ce788
commit 189f7bea77
12 changed files with 36 additions and 19 deletions

View File

@ -1,7 +1,7 @@
//
// FILE: AD56X8.cpp
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2022-07-28
// PURPOSE: Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.

View File

@ -2,7 +2,7 @@
//
// FILE: AD56X8.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.0
// VERSION: 0.2.1
// DATE: 2022-07-28
// PURPOSE: Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.
@ -10,13 +10,15 @@
#include "Arduino.h"
#include "SPI.h"
#define AD56X8_LIB_VERSION (F("0.2.0"))
#define AD56X8_LIB_VERSION (F("0.2.1"))
#if defined(ARDUINO_ARCH_RP2040)
#define __SPI_CLASS__ SPIClassRP2040
#else
#define __SPI_CLASS__ SPIClass
#ifndef __SPI_CLASS__
#if defined(ARDUINO_ARCH_RP2040)
#define __SPI_CLASS__ SPIClassRP2040
#else
#define __SPI_CLASS__ SPIClass
#endif
#endif

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [0.2.1] - 2024-01-02
- fix __SPI_CLASS__
- fix examples
- minor edits
## [0.2.0] - 2023-11-27
- refactor constructor interface - breaking changes.
- minimize conditional code. -- create SPI_CLASS macro to solve it.

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2022-2023 Rob Tillaart
Copyright (c) 2022-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

@ -13,7 +13,7 @@
Experimental Library for the AD56X8 series digital analog convertor.
Note: not yet tested, TODO buy hardware.
Note: not yet tested with hardware, TODO buy hardware.
Feedback, issues, improvements are welcome.
Please file an issue on GitHub.
@ -113,8 +113,11 @@ effectively a prepare + update in one call.
Returns false if channel out of range.
- **uint16_t getValue(uint8_t channel)** returns set OR prepared value.
At power up the DAC's will be reset to 0 V except the AD5668-3 (2.5V).
- **bool setPercentage(uint8_t channel, float percentage)** idem.
- **float getPercentage(uint8_t channel)** idem.
- **bool setPercentage(uint8_t channel, float percentage)** sets the output as a percentage 0..100.
If percentage is out of range, it is not set and the function returns false.
- **float getPercentage(uint8_t channel)** returns percentage, wrapper around **getValue()**.
Might return a slightly different value than **setPercentage()** due to
rounding errors.
- **bool prepareChannel(uint8_t channel, uint16_t value)** prepares the value for a channel.
Returns false if channel out of range.
- **bool updateChannel(uint8_t channel)** writes the prepared value to ADC.

View File

@ -1,7 +1,8 @@
//
// FILE: AD56X8_performance.ino
// AUTHOR: Rob Tillaart
// PUPROSE: performance test
// PURPOSE: performance test
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"

View File

@ -1,8 +1,8 @@
//
// FILE: AD56X8_test.ino
// AUTHOR: Rob Tillaart
// PUPROSE: test
// PURPOSE: test
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"

View File

@ -1,7 +1,9 @@
//
// FILE: AD56X8_test_ESP32.ino
// AUTHOR: Rob Tillaart
// PUPROSE: test
// PURPOSE: test
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"

View File

@ -1,7 +1,8 @@
//
// FILE: AD56X8_test_percentage.ino
// AUTHOR: Rob Tillaart
// PUPROSE: test
// PURPOSE: test
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"

View File

@ -1,7 +1,8 @@
//
// FILE: AD56X8_wave.ino
// AUTHOR: Rob Tillaart
// PUPROSE: performance test
// PURPOSE: demo
// URL: https://github.com/RobTillaart/AD56X8
#include "AD56X8.h"

View File

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

View File

@ -1,5 +1,5 @@
name=AD56X8
version=0.2.0
version=0.2.1
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for AD56X8, SPI 8 channel Digital Analog Convertor.