GY-63_MS5611/libraries/ADG726
2024-04-13 10:35:57 +02:00
..
.github bulk update GitHub actions 2024-04-13 10:35:57 +02:00
examples 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
test 0.1.0 ADG726 2023-07-25 20:52:51 +02:00
.arduino-ci.yml 0.1.0 ADG726 2023-07-25 20:52:51 +02:00
ADG726.h 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
CHANGELOG.md 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
keywords.txt 0.1.0 ADG726 2023-07-25 20:52:51 +02:00
library.json 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
library.properties 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
LICENSE 0.1.2 ADG726 2024-03-17 17:53:15 +01:00
README.md 0.1.2 ADG726 2024-03-17 17:53:15 +01:00

Arduino CI Arduino-lint JSON check GitHub issues

License: MIT GitHub release PlatformIO Registry

ADG726

Arduino library for ADG726 - 16 to 1 channel (2x) multiplexer.

Description

Experimental

ADG726 is an Arduino class that controls two 16 to 1 multiplexers (or 1 to 16) over a parallel interface. The channel selection is disjunct which means that only
one of the 16 channels can be connected (selected) at the same time. The channels can be set per multiplexer or together in one call. The library also support to set them all off (17th state).

On power-up, all switches are in the OFF state.

This library can be used e.g. to connect 16 analog devices to one analog port, or to select between 16 DHT22 sensors.

No tests with hardware have been done yet, so use with care. Feedback welcome!

Interface

#include "ADG726.h"
  • ADG726(uint8_t A, uint8_t B, uint8_t C, uint8_t D, uint8_t CSA, uint8_t CSB, uint8_t EN, uint8_t WR) constructor.
  • ADG726(uint8_t address[4], uint8_t CSA, uint8_t CSB, uint8_t EN, uint8_t WR) constructor.
  • void setChannel(uint8_t channel) set the current channel for both A and B. Valid values for channel are 0..15.
  • void setChannelA(uint8_t channel) set the current channel for A only. Valid values for channel are 0..15.
  • void setChannelB(uint8_t channel) set the current channel for B only. Valid values for channel are 0..15.
  • uint8_t getChannelA() get last set channel A == 0..15 or ADG726_ALLOFF (128).
  • uint8_t getChannelB() get last set channel B == 0..15 or ADG726_ALLOFF (128).
  • uint8_t channelCount() returns 16 for ADG726.
  • void allOff() sets all channels to OFF, none selected.

Future

Must

  • improve documentation
  • test with hardware
  • keep in sync with ADG725 (interface)

Should

  • add examples

Could

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,