0.1.1 ADG731

This commit is contained in:
Rob Tillaart 2023-10-16 16:13:58 +02:00
parent a5da9c94fa
commit c3bb5e50e1
7 changed files with 31 additions and 12 deletions

View File

@ -3,14 +3,14 @@
// FILE: ADG731.h // FILE: ADG731.h
// AUTHOR: Rob Tillaart // AUTHOR: Rob Tillaart
// DATE: 2023-07-24 // DATE: 2023-07-24
// VERSION: 0.1.0 // VERSION: 0.1.1
// PURPOSE: Arduino library for ADG731 - 32 to 1 channel multiplexer // PURPOSE: Arduino library for ADG731 - 32 to 1 channel multiplexer
// URL: https://github.com/RobTillaart/ADG731 // URL: https://github.com/RobTillaart/ADG731
#include "Arduino.h" #include "Arduino.h"
#define ADG731_LIB_VERSION (F("0.1.0")) #define ADG731_LIB_VERSION (F("0.1.1"))
#define ADG731_ALLOFF 0x80 #define ADG731_ALLOFF 0x80
@ -39,7 +39,7 @@ public:
void setChannel(uint8_t channel) void setChannel(uint8_t channel)
{ {
_channel = channel & 0x0F; _channel = channel & 0x1F;
write(_channel); write(_channel);
} }

View File

@ -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/). 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 ## [0.1.0] - 2023-07-24
- initial version - initial version

View File

@ -2,8 +2,11 @@
[![Arduino CI](https://github.com/RobTillaart/ADG731/workflows/Arduino%20CI/badge.svg)](https://github.com/marketplace/actions/arduino_ci) [![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) [![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) [![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) [![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) [![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 # ADG731
@ -31,9 +34,6 @@ Not tests with hardware have been done yet, so use with care.
Feedback welcome! Feedback welcome!
TODO insert picture.
#### Related #### Related
- https://github.com/RobTillaart/HC4051 (1x8 mux) - 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/HC4053 (3x2 mux)
- https://github.com/RobTillaart/HC4067 (1x16 mux) - https://github.com/RobTillaart/HC4067 (1x16 mux)
- https://github.com/RobTillaart/ADG725 (2x16 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/ADG731 (1x32 mux)
- https://github.com/RobTillaart/ADG732 (1x32 mux)
## Interface ## Interface
@ -55,7 +57,7 @@ TODO insert picture.
Valid values for channel are 0..31. Valid values for channel are 0..31.
- **uint8_t getChannel()** get last set channel == 0..31 or ADG731_ALLOFF. - **uint8_t getChannel()** get last set channel == 0..31 or ADG731_ALLOFF.
- **uint8_t channelCount()** returns 32 for ADG731. - **uint8_t channelCount()** returns 32 for ADG731.
- **void allOff()** sets all channels to OFF, none selected.
## Future ## Future
@ -75,3 +77,12 @@ Valid values for channel are 0..31.
#### Wont #### 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,

View File

@ -20,10 +20,13 @@ void setup()
delay(100); delay(100);
start = micros(); start = micros();
ADG.setChannel(0); for (int ch = 0; ch < 32; ch++)
{
ADG.setChannel(ch);
}
stop = micros(); stop = micros();
Serial.print("Time:\t"); Serial.print("Time:\t");
Serial.println(stop - start); Serial.println((stop - start) / 32.0);
delay(100); delay(100);
start = micros(); start = micros();

View File

@ -6,9 +6,9 @@ ADG731 KEYWORD1
# Methods and Functions (KEYWORD2) # Methods and Functions (KEYWORD2)
setChannel KEYWORD2 setChannel KEYWORD2
setChannel KEYWORD2
getChannel KEYWORD2 getChannel KEYWORD2
channelCount KEYWORD2 channelCount KEYWORD2
allOff KEYWORD2
# Constants (LITERAL1) # Constants (LITERAL1)

View File

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

View File

@ -1,5 +1,5 @@
name=ADG731 name=ADG731
version=0.1.0 version=0.1.1
author=Rob Tillaart <rob.tillaart@gmail.com> author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com> maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library for ADG731 - 32 to 1 channel multiplexer. sentence=Arduino library for ADG731 - 32 to 1 channel multiplexer.