#include <AD7734.h>
|
| AD7734 (uint8_t sync_pin, uint8_t spi_bus_config_pin, uint8_t data_ready_pin, uint8_t slot_number=0, uint8_t reset_pin=0) |
|
| AdcSpi (uint8_t sync_pin, uint8_t spi_bus_config_pin, uint8_t data_ready_pin, uint8_t bit_resolution, uint8_t reset_pin=0, uint8_t clock_divider=7, BitOrder bit_order=MSBFIRST, uint8_t spi_mode=SPI_MODE3) |
|
bool | Begin (void) |
|
double | ReadVoltage (uint8_t channel=0) |
|
uint8_t | ReadVoltage (uint8_t channel, byte previous_meas[], bool send) |
|
AD7734 class
- Author
- Carlos Kometter
- Version
- 0.1
- Date
- 2018
- Copyright
- GNU Public License.
AD7734::AD7734 |
( |
uint8_t |
sync_pin, |
|
|
uint8_t |
spi_bus_config_pin, |
|
|
uint8_t |
data_ready_pin, |
|
|
uint8_t |
slot_number = 0 , |
|
|
uint8_t |
reset_pin = 0 |
|
) |
| |
Constructor
- Parameters
-
[in] | sync_pin | The sync or chip select of the adc chip. Different than spi_bus_config_pin |
[in] | spi_bus_config_pin | The pin that identifies the bus. More than one adc can share the same pin. |
[in] | data_ready_pin | This pin tells whether the adc has finished measuring a voltage. |
[in] | slot_number | This number is used to identify the chip or board. (default: 0) |
[in] | reset_pin | The reset pin |
Uses chip specifications (e.g. bit resolution, registers, range) to convert a set of bytes stored in a Message object to voltage. Each ADC has its own convertion function. Check the datasheet of each chip and override the function below accordingly.
- Parameters
-
[in] | message | Message object which stores the bytes for conversion. |
- Returns
- The measured voltage.
Implements AdcSpi.
- Parameters
-
[in] | channel | The channel to be read. |
- Returns
- Message object to read the data register.
Implements AdcSpi.
- Parameters
-
[in] | channel | The channel to start single conversion mode on dump mode. |
- Returns
- Message object to start single conversion mode on dump mode.
Implements AdcSpi.
The documentation for this class was generated from the following files: