mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.1.1 ADG731
This commit is contained in:
parent
a5da9c94fa
commit
c3bb5e50e1
@ -3,14 +3,14 @@
|
||||
// FILE: ADG731.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// DATE: 2023-07-24
|
||||
// VERSION: 0.1.0
|
||||
// VERSION: 0.1.1
|
||||
// PURPOSE: Arduino library for ADG731 - 32 to 1 channel multiplexer
|
||||
// URL: https://github.com/RobTillaart/ADG731
|
||||
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
#define ADG731_LIB_VERSION (F("0.1.0"))
|
||||
#define ADG731_LIB_VERSION (F("0.1.1"))
|
||||
|
||||
#define ADG731_ALLOFF 0x80
|
||||
|
||||
@ -39,7 +39,7 @@ public:
|
||||
|
||||
void setChannel(uint8_t channel)
|
||||
{
|
||||
_channel = channel & 0x0F;
|
||||
_channel = channel & 0x1F;
|
||||
write(_channel);
|
||||
}
|
||||
|
||||
|
@ -6,5 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
|
||||
## [0.1.1] - 2023-10-16
|
||||
- update readme.md (badges)
|
||||
- fix setChannel() - mask.
|
||||
|
||||
|
||||
## [0.1.0] - 2023-07-24
|
||||
- initial version
|
||||
|
@ -2,8 +2,11 @@
|
||||
[![Arduino CI](https://github.com/RobTillaart/ADG731/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci)
|
||||
[![Arduino-lint](https://github.com/RobTillaart/ADG731/actions/workflows/arduino-lint.yml/badge.svg)](https://github.com/RobTillaart/ADG731/actions/workflows/arduino-lint.yml)
|
||||
[![JSON check](https://github.com/RobTillaart/ADG731/actions/workflows/jsoncheck.yml/badge.svg)](https://github.com/RobTillaart/ADG731/actions/workflows/jsoncheck.yml)
|
||||
[![GitHub issues](https://img.shields.io/github/issues/RobTillaart/ADG731.svg)](https://github.com/RobTillaart/ADG731/issues)
|
||||
|
||||
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/RobTillaart/ADG731/blob/master/LICENSE)
|
||||
[![GitHub release](https://img.shields.io/github/release/RobTillaart/ADG731.svg?maxAge=3600)](https://github.com/RobTillaart/ADG731/releases)
|
||||
[![PlatformIO Registry](https://badges.registry.platformio.org/packages/robtillaart/library/ADG731.svg)](https://registry.platformio.org/libraries/robtillaart/ADG731)
|
||||
|
||||
|
||||
# ADG731
|
||||
@ -31,9 +34,6 @@ Not tests with hardware have been done yet, so use with care.
|
||||
Feedback welcome!
|
||||
|
||||
|
||||
TODO insert picture.
|
||||
|
||||
|
||||
#### Related
|
||||
|
||||
- https://github.com/RobTillaart/HC4051 (1x8 mux)
|
||||
@ -41,7 +41,9 @@ TODO insert picture.
|
||||
- https://github.com/RobTillaart/HC4053 (3x2 mux)
|
||||
- https://github.com/RobTillaart/HC4067 (1x16 mux)
|
||||
- https://github.com/RobTillaart/ADG725 (2x16 mux)
|
||||
- https://github.com/RobTillaart/ADG726 (2x16 mux)
|
||||
- https://github.com/RobTillaart/ADG731 (1x32 mux)
|
||||
- https://github.com/RobTillaart/ADG732 (1x32 mux)
|
||||
|
||||
|
||||
## Interface
|
||||
@ -55,7 +57,7 @@ TODO insert picture.
|
||||
Valid values for channel are 0..31.
|
||||
- **uint8_t getChannel()** get last set channel == 0..31 or ADG731_ALLOFF.
|
||||
- **uint8_t channelCount()** returns 32 for ADG731.
|
||||
|
||||
- **void allOff()** sets all channels to OFF, none selected.
|
||||
|
||||
## Future
|
||||
|
||||
@ -75,3 +77,12 @@ Valid values for channel are 0..31.
|
||||
#### Wont
|
||||
|
||||
|
||||
## Support
|
||||
|
||||
If you appreciate my libraries, you can support the development and maintenance.
|
||||
Improve the quality of the libraries by providing issues and Pull Requests, or
|
||||
donate through PayPal or GitHub sponsors.
|
||||
|
||||
Thank you,
|
||||
|
||||
|
||||
|
@ -20,10 +20,13 @@ void setup()
|
||||
delay(100);
|
||||
|
||||
start = micros();
|
||||
ADG.setChannel(0);
|
||||
for (int ch = 0; ch < 32; ch++)
|
||||
{
|
||||
ADG.setChannel(ch);
|
||||
}
|
||||
stop = micros();
|
||||
Serial.print("Time:\t");
|
||||
Serial.println(stop - start);
|
||||
Serial.println((stop - start) / 32.0);
|
||||
delay(100);
|
||||
|
||||
start = micros();
|
||||
|
@ -6,9 +6,9 @@ ADG731 KEYWORD1
|
||||
|
||||
# Methods and Functions (KEYWORD2)
|
||||
setChannel KEYWORD2
|
||||
setChannel KEYWORD2
|
||||
getChannel KEYWORD2
|
||||
channelCount KEYWORD2
|
||||
allOff KEYWORD2
|
||||
|
||||
|
||||
# Constants (LITERAL1)
|
||||
|
@ -15,7 +15,7 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/ADG731"
|
||||
},
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"license": "MIT",
|
||||
"frameworks": "*",
|
||||
"platforms": "*",
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=ADG731
|
||||
version=0.1.0
|
||||
version=0.1.1
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for ADG731 - 32 to 1 channel multiplexer.
|
||||
|
Loading…
Reference in New Issue
Block a user