@@ -29,37 +29,42 @@ This library only supports the single channel versions.
2929The library does not support the I2C versions of these devices.
3030These can be recognized from the C as ADCxxxC
3131
32- The library can put the device in ** lowPower()** and needs a call to
33- ** wakeUp()** to wake up. Alternative way to wake up the device is to
34- do a dummy ** read()** .
32+ The library can put the device in ** lowPower()** mode and needs a call to
33+ ** wakeUp()** to wake up the device.
34+ Alternative way to wake up the device is to execute a dummy ** read()** .
3535
3636The library is not tested with hardware yet.
3737
3838Feedback is as always welcome.
3939
4040
41- #### 0.2.0 Breaking change
41+ ### 0.2.0 Breaking change
4242
4343Version 0.2.0 introduced a breaking change to improve handling the SPI dependency.
4444The user has to call ** SPI.begin()** or equivalent before calling ** ADC.begin()** .
4545Optionally the user can provide parameters to the ** SPI.begin(...)**
4646
4747
48- #### Performance
48+ ### Performance
4949
5050Although the ADC081S021 is rated at 200 KSPS, an Arduino UNO will not
5151be able to fetch that much samples from the device.
5252The reason is that an UNO cannot fetch the bits fast enough from the device.
53- At maximum SPI speed of 8 MHz one will get at most 50 KSPS.
53+ At maximum SPI speed of 8 MHz one will get at most 50 KSPS.
54+ Furthermore the UNO has only 2KB RAM so it would fill up quite fast.
5455
5556For the faster ones, see below, at 1 MSPS one need a clock of at least 16 MHz
5657+ time to process the incoming data.
5758A faster processor like an ESP32 or Teensy might do the job.
5859
60+ Investigations should be made for a sort of continuous mode.
61+ This would have the CS line constantly LOW and be able to read from the same
62+ address over and over. Note this is not in the library!
63+
5964To be tested, feedback welcome.
6065
6166
62- #### Compatibles
67+ ### Compatibles
6368
6469Texas instruments has 9 devices in this series, which can be used with the
6570three classes of this library.
@@ -81,14 +86,16 @@ e.g ADC081S021 = 8 bits 1 channel SPI 200000
8186S == SPI.C == I2C.
8287
8388
84- #### Related
89+ ### Related
8590
8691- https://github.com/RobTillaart/ADC08XS 2 + 4 channel library
92+ - https://github.com/RobTillaart/ADC081S single channel version of this series.
8793- https://gammon.com.au/adc tutorial about ADC's (UNO specific)
8894- https://github.com/RobTillaart/MCP_ADC
8995- https://github.com/RobTillaart/ADS1x15 (12 & 16 bit ADC, I2C, slow)
9096- https://github.com/RobTillaart/PCF8591 (8 bit ADC + 1 bit DAC)
9197- https://github.com/RobTillaart/MCP_DAC
98+ - https://www.mikroe.com/adc-19-click
9299
93100
94101## Interface
@@ -97,7 +104,7 @@ S == SPI.C == I2C.
97104#include " ADC081S.h"
98105```
99106
100- #### Constructors
107+ ### Constructors
101108
102109The ADC101S and ADC121S have an identical interface as the ADC081S.
103110
@@ -109,27 +116,30 @@ The ADC101S and ADC121S have an identical interface as the ADC081S.
109116depending on number of bits of the actual ADC.
110117
111118
112- #### Base
119+ ### Read
120+
121+ - ** uint16_t read()** reads a value from the device.
122+
123+
124+ ### SPI
113125
114- - ** uint16_t read()** reads the value of the device.
115126- ** void setSPIspeed(uint32_t speed)** sets SPI clock in ** Hz** ,
116127please read datasheet of the ADC first to get optimal speed.
117128- ** uint32_t getSPIspeed()** returns current speed in ** Hz** .
129+ - ** bool usesHWSPI()** returns true if hardware SPI is used.
118130
119131
120- #### Low power
132+ ### Low power
121133
122134- ** void lowPower()** put device in low power mode.
123135- ** void wakeUp()** put device in normal power mode.
124136- ** bool isLowPower()** returns true if in low power mode, so wakeUp needed().
125137
126- Alternative way to wake up the device is to
127- do a dummy ** read()** .
138+ Alternative way to wake up the device is to do a dummy ** read()** call.
128139
129140
130- #### Debug
141+ ### Debug
131142
132- - ** bool usesHWSPI()** returns true if hardware SPI is used.
133143- ** uint32_t count()** returns number of reads since start.
134144
135145
@@ -139,7 +149,7 @@ do a dummy **read()**.
139149
140150- improve documentation
141151- get hardware to test / verify working
142- - align with ADC08XS where possible
152+ - align with ADC081S/ ADC08XS where possible
143153
144154#### Should
145155
0 commit comments