mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.2.1 AD56X8
This commit is contained in:
parent
b9559ce788
commit
189f7bea77
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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"
|
||||
|
@ -1,8 +1,8 @@
|
||||
//
|
||||
// FILE: AD56X8_test.ino
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PUPROSE: test
|
||||
|
||||
// PURPOSE: test
|
||||
// URL: https://github.com/RobTillaart/AD56X8
|
||||
|
||||
#include "AD56X8.h"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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": "*",
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user