@@ -43,13 +43,13 @@ The library defines AD524X_MIDPOINT == 127.
4343To be used to set to defined mid-point.
4444
4545
46- #### 0.5.0 Breaking change
46+ ### 0.5.0 Breaking change
4747
4848The ESP32 specific ** begin(sda, scl)** is removed.
4949The user has to call ** Wire.begin()** or equivalent himself before calling ** begin()** .
5050
5151
52- #### Related
52+ ### Related
5353
5454- https://github.com/RobTillaart/AD520x
5555- https://github.com/RobTillaart/AD524X
@@ -60,7 +60,7 @@ The user has to call **Wire.begin()** or equivalent himself before calling **beg
6060- https://github.com/RobTillaart/X9C10X
6161
6262
63- #### Compatibles ?
63+ ### Compatibles ?
6464
6565If you find compatible devices please let me know.
6666
@@ -77,6 +77,24 @@ The AD524X has two address lines to configure the I2C address. 0x2C - 0x2F
7777| 47 | 0x2F | +5V | +5V |
7878
7979
80+ ### I2C multiplexing
81+
82+ Sometimes you need to control more devices than possible with the default
83+ address range the device provides.
84+ This is possible with an I2C multiplexer e.g. TCA9548 which creates up
85+ to eight channels (think of it as I2C subnets) which can use the complete
86+ address range of the device.
87+
88+ Drawback of using a multiplexer is that it takes more administration in
89+ your code e.g. which device is on which channel.
90+ This will slow down the access, which must be taken into account when
91+ deciding which devices are on which channel.
92+ Also note that switching between channels will slow down other devices
93+ too if they are behind the multiplexer.
94+
95+ - https://github.com/RobTillaart/TCA9548
96+
97+
8098## Interface
8199
82100``` cpp
@@ -87,7 +105,7 @@ The library has a number of functions which are all quite straightforward.
87105One can get / set the value of (both) the potentiometer(s), and the O1 and O2 output lines.
88106
89107
90- #### Constructors
108+ ### Constructors
91109
92110- ** AD524X(uint8_t address, TwoWire \* wire = &Wire)** constructor base class,
93111creates an instance with 2 potentiometer.
@@ -99,15 +117,15 @@ The developer is responsible for handling this correctly.
99117- ** AD5282(uint8_t address, TwoWire \* wire = &Wire)** create an instance with 2 potentiometer.
100118
101119
102- #### Wire initialization
120+ ### Initialization
103121
104122- ** bool begin()** initialization of the object.
105123Note the user must call ** wire.begin()** or equivalent before calling ** begin()** .
106124- ** bool isConnected()** See if the address set in constructor is on the I2C bus.
107125- ** uint8_t getAddress()** returns address set in constructor, convenience.
108126
109127
110- #### Basic IO
128+ ### Basic IO
111129
112130- ** uint8_t write(uint8_t rdac, uint8_t value)** set channel rdac 0/1 to value 0..255.
113131- ** uint8_t write(uint8_t rdac, uint8_t value, uint8_t O1, uint8_t O2)** idem + set output lines O1 and O2 too.
@@ -118,15 +136,15 @@ Note the user must call **wire.begin()** or equivalent before calling **begin()*
118136- ** uint8_t getO2()** read back O2 line.
119137
120138
121- #### Misc
139+ ### Misc
122140
123141- ** uint8_t zeroAll()** sets potentiometer's to 0 and I/O to LOW.
124142- ** uint8_t reset()** sets potentiometer's to midpoint == 127 and I/O to LOW. (startup default)
125143- ** uint8_t midScaleReset(uint8_t rdac)** resets one potentiometer to midpoint == 127.
126144- ** uint8_t readBackRegister()** read register back, for debugging.
127145
128146
129- #### Experimental
147+ ### Experimental
130148
131149- ** uint8_t shutDown()** check datasheet, not tested yet, use at own risk.
132150
0 commit comments