i2c_adc_ads7828  v2.0.2
Arduino library for TI ADS7828 I2C A/D converter.
ADS7828 Class Reference
Collaboration diagram for ADS7828:

Public Member Functions

 ADS7828 (uint8_t)
 Constructor with the following defaults: More...
 
 ADS7828 (uint8_t, uint8_t)
 
 ADS7828 (uint8_t, uint8_t, uint8_t)
 
 ADS7828 (uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
 
uint8_t address ()
 Device address as defined by pins A1, A0. More...
 
ADS7828Channelchannel (uint8_t)
 Return pointer to channel object. More...
 
uint8_t commandByte ()
 Return command byte for device object (PD1 PD0 bits only). More...
 
uint8_t start ()
 Initiate communication with device. More...
 
uint8_t start (uint8_t)
 
uint8_t update ()
 Update all unmasked channels on device. More...
 
uint8_t update (uint8_t)
 

Static Public Member Functions

static void begin ()
 Enable I2C communication. More...
 
static ADS7828device (uint8_t)
 Return pointer to device object. More...
 
static uint8_t updateAll ()
 Update all unmasked channels on all registered devices. More...
 

Public Attributes

uint8_t channelMask
 Each bit position containing a 1 represents a channel that is to be read via update() / updateAll(). More...
 

Private Member Functions

void init (uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
 Common code for constructors. More...
 
uint16_t read ()
 Request and receive data from most-recent A/D conversion from device. More...
 

Static Private Member Functions

static uint16_t read (uint8_t)
 Request and receive data from most-recent A/D conversion from device. More...
 
static uint8_t start (uint8_t, uint8_t)
 Initiate communication with device. More...
 
static uint8_t update (ADS7828 *)
 Initiate communication with device. More...
 
static uint8_t update (ADS7828 *, uint8_t)
 Initiate communication with device. More...
 

Private Attributes

uint8_t address_
 Device address as defined by pins A1, A0.
 
ADS7828Channel channels_ [8]
 Array of channel objects.
 
uint8_t commandByte_
 Command byte for device object (PD1 PD0 bits only).
 

Static Private Attributes

static ADS7828devices_ [4] = {}
 Array of pointers to registered device objects.
 
static const uint8_t BASE_ADDRESS_ = 0x48
 Factory pre-set slave address.
 

Related Functions

(Note that these are not member functions.)

static const uint8_t DIFFERENTIAL = 0 << 7
 Configure channels to use differential inputs (Command byte SD=0). More...
 
static const uint8_t SINGLE_ENDED = 1 << 7
 Configure channels to use single-ended inputs (Command byte SD=1). More...
 
static const uint8_t REFERENCE_OFF = 0 << 3
 Configure channels to turn internal reference OFF between conversions (Command byte PD1=0). More...
 
static const uint8_t REFERENCE_ON = 1 << 3
 Configure channels to turn internal reference ON between conversions (Command byte PD1=1). More...
 
static const uint8_t ADC_OFF = 0 << 2
 Configure channels to turn A/D converter OFF between conversions (Command byte PD0=0). More...
 
static const uint8_t ADC_ON = 1 << 2
 Configure channels to turn A/D converter ON between conversions (Command byte PD0=1). More...
 
static const uint8_t DEFAULT_CHANNEL_MASK = 0xFF
 Default channel mask used in ADS7828 constructor.
 
static const uint16_t DEFAULT_MIN_SCALE = 0
 Default scaling minimum value used in ADS7828 constructor.
 
static const uint16_t DEFAULT_MAX_SCALE = 0xFFF
 Default scaling maximum value used in ADS7828 constructor.
 

Detailed Description

Constructor & Destructor Documentation

§ ADS7828() [1/4]

ADS7828::ADS7828 ( uint8_t  address)

Constructor with the following defaults:

  • differential inputs (SD=0)
  • internal reference OFF between conversions (PD1=0)
  • A/D converter OFF between conversions (PD0=0)
  • min scale=0
  • max scale=4095
Parameters
addressdevice address (0..3)
Usage:
...
// construct device with address 2
ADS7828 adc(2);
...
See also
ADS7828::address()
283 {
286 }
static const uint16_t DEFAULT_MAX_SCALE
Default scaling maximum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:186
static const uint16_t DEFAULT_MIN_SCALE
Default scaling minimum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:181
static const uint8_t DIFFERENTIAL
Configure channels to use differential inputs (Command byte SD=0).
Definition: i2c_adc_ads7828.h:101
static const uint8_t REFERENCE_OFF
Configure channels to turn internal reference OFF between conversions (Command byte PD1=0)...
Definition: i2c_adc_ads7828.h:129
static const uint8_t ADC_OFF
Configure channels to turn A/D converter OFF between conversions (Command byte PD0=0).
Definition: i2c_adc_ads7828.h:157
void init(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
Common code for constructors.
Definition: i2c_adc_ads7828.cpp:575
static const uint8_t DEFAULT_CHANNEL_MASK
Default channel mask used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:176
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365

§ ADS7828() [2/4]

ADS7828::ADS7828 ( uint8_t  address,
uint8_t  options 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
optionscommand byte bits SD, PD1, PD0
Usage:
...
// device address 0, differential inputs, ref/ADC ON between conversions
ADS7828 adc0(0, DIFFERENTIAL | REFERENCE_ON | ADC_ON);
// device address 1, single-ended inputs, ref/ADC OFF between conversions
// device address 2, single-ended inputs, ref/ADC ON between conversions
...
See also
ADS7828Channel::commandByte()
306 {
309 }
static const uint16_t DEFAULT_MAX_SCALE
Default scaling maximum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:186
static const uint16_t DEFAULT_MIN_SCALE
Default scaling minimum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:181
void init(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
Common code for constructors.
Definition: i2c_adc_ads7828.cpp:575
static const uint8_t DEFAULT_CHANNEL_MASK
Default channel mask used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:176
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365

§ ADS7828() [3/4]

ADS7828::ADS7828 ( uint8_t  address,
uint8_t  options,
uint8_t  channelMask 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
channelMaskbit positions containing a 1 represent channels that are to be read via update() / updateAll()
Usage:
...
// device address 0, update all channels via updateAll() (bits 7..0 are set)
ADS7828 adc0(0, 0, 0xFF);
// device address 1, update channels 0..3 via updateAll() (bits 3..0 are set)
ADS7828 adc1(1, 0, 0b00001111);
// device address 2, update channels 0, 1, 2, 7 via updateAll() (bits 7, 2, 1, 0 are set)
ADS7828 adc2(2, 0, 0b10000111);
...
See also
ADS7828::channelMask
330 {
332 }
static const uint16_t DEFAULT_MAX_SCALE
Default scaling maximum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:186
static const uint16_t DEFAULT_MIN_SCALE
Default scaling minimum value used in ADS7828 constructor.
Definition: i2c_adc_ads7828.h:181
void init(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
Common code for constructors.
Definition: i2c_adc_ads7828.cpp:575
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365
uint8_t channelMask
Each bit position containing a 1 represents a channel that is to be read via update() / updateAll()...
Definition: i2c_adc_ads7828.h:292

§ ADS7828() [4/4]

ADS7828::ADS7828 ( uint8_t  address,
uint8_t  options,
uint8_t  channelMask,
uint16_t  min,
uint16_t  max 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
minminimum scaling value applied to value()
maxmaximum scaling value applied to value()
Usage:
...
// device address 2, channel default minScale 0, maxScale 100
ADS7828 adc(2, 0, DEFAULT_CHANNEL_MASK, 0, 100);
...
See also
ADS7828Channel::minScale, ADS7828Channel::maxScale
348 {
349  init(address, options, channelMask, min, max);
350 }
void init(uint8_t, uint8_t, uint8_t, uint16_t, uint16_t)
Common code for constructors.
Definition: i2c_adc_ads7828.cpp:575
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365
uint8_t channelMask
Each bit position containing a 1 represents a channel that is to be read via update() / updateAll()...
Definition: i2c_adc_ads7828.h:292

Member Function Documentation

§ address()

uint8_t ADS7828::address ( )

Device address as defined by pins A1, A0.

Return values
0x00A1=0, A0=0
0x01A1=0, A0=1
0x02A1=1, A0=0
0x03A1=1, A0=1
Usage:
...
ADS7828 adc(3);
uint8_t deviceAddress = adc.address();
...
Examples:
examples/two_devices/two_devices.ino.
366 {
367  return address_;
368 }
uint8_t address_
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.h:309

§ channel()

ADS7828Channel * ADS7828::channel ( uint8_t  ch)

Return pointer to channel object.

Parameters
chchannel number (0..7)
Returns
pointer to ADS7828Channel object
Usage:
...
ADS7828 adc(0);
ADS7828Channel* temperature = adc.channel(0);
...
Examples:
examples/one_device/one_device.ino.
382 {
383  return &channels_[ch & 0x07];
384 }
ADS7828Channel channels_[8]
Array of channel objects.
Definition: i2c_adc_ads7828.h:312
Here is the caller graph for this function:

§ commandByte()

uint8_t ADS7828::commandByte ( )

Return command byte for device object (PD1 PD0 bits only).

Optional Function (Troubleshooting):
This function is for testing and troubleshooting.
Return values
0x00Power Down Between A/D Converter Conversions
0x04Internal Reference OFF and A/D Converter ON
0x08Internal Reference ON and A/D Converter OFF
0x0CInternal Reference ON and A/D Converter ON
Usage:
...
ADS7828 adc(0);
uint8_t command = adc.commandByte();
...
401 {
402  return commandByte_;
403 }
uint8_t commandByte_
Command byte for device object (PD1 PD0 bits only).
Definition: i2c_adc_ads7828.h:315
Here is the caller graph for this function:

§ start() [1/3]

uint8_t ADS7828::start ( )

Initiate communication with device.

Optional Function (Troubleshooting):
This function is for testing and troubleshooting and can be used to determine whether a device is available (similar to the TCP/IP ping command).
Return values
0success
1length too long for buffer
2address send, NACK received (device not on bus)
3data send, NACK received
4other twi error (lost bus arbitration, bus error, ...)
Usage:
...
ADS7828 adc(3);
// test whether device is available
uint8_t status = adc.start();
...
424 {
425  return start(0);
426 }
uint8_t start()
Initiate communication with device.
Definition: i2c_adc_ads7828.cpp:423
Here is the call graph for this function:
Here is the caller graph for this function:

§ start() [2/3]

uint8_t ADS7828::start ( uint8_t  ch)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Optional Function (Troubleshooting):
This function is for testing and troubleshooting.
Parameters
chchannel number (0..7)
Return values
0success
1length too long for buffer
2address send, NACK received (device not on bus)
3data send, NACK received
4other twi error (lost bus arbitration, bus error, ...)
Usage:
...
ADS7828 adc(0);
// test whether device is available (channel 3 A/D conversion started)
uint8_t status = adc.start(3);
...
446 {
447  return start(address_, commandByte_ | channel(ch)->commandByte());
448 }
uint8_t commandByte()
Return command byte for device object (PD1 PD0 bits only).
Definition: i2c_adc_ads7828.cpp:400
uint8_t address_
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.h:309
uint8_t start()
Initiate communication with device.
Definition: i2c_adc_ads7828.cpp:423
uint8_t commandByte_
Command byte for device object (PD1 PD0 bits only).
Definition: i2c_adc_ads7828.h:315
ADS7828Channel * channel(uint8_t)
Return pointer to channel object.
Definition: i2c_adc_ads7828.cpp:381
Here is the call graph for this function:

§ update() [1/4]

uint8_t ADS7828::update ( )

Update all unmasked channels on device.

Required Function:
Call this or one of the update() / updateAll() functions from within loop() in order to read data from device(s).
Returns
quantity of channels updated (0..8)
Usage:
...
ADS7828 adc(0);
...
void loop()
{
...
// update device 0, all unmasked channels
uint8_t quantity = adc.update();
...
}
...
470 {
471  return update(this);
472 }
uint8_t update()
Update all unmasked channels on device.
Definition: i2c_adc_ads7828.cpp:469
Here is the call graph for this function:
Here is the caller graph for this function:

§ update() [2/4]

uint8_t ADS7828::update ( uint8_t  ch)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Required Function:
Call this or one of the update() / updateAll() functions from within loop() in order to read data from device(s).
Parameters
chchannel number (0..7)
Return values
0success
1length too long for buffer
2address send, NACK received (device not on bus)
3data send, NACK received
4other twi error (lost bus arbitration, bus error, ...)
Usage:
...
ADS7828 adc(0);
...
void loop()
{
...
// update device 0, channel 3
uint8_t status = adc.update(3);
...
}
...
499 {
500  return update(this, ch);
501 }
uint8_t update()
Update all unmasked channels on device.
Definition: i2c_adc_ads7828.cpp:469
Here is the call graph for this function:

§ begin()

void ADS7828::begin ( )
static

Enable I2C communication.

Required Function:
Call from within setup()to enable I2C communication.
Usage:
...
void setup()
{
// enable I2C communication
}
...
Examples:
examples/one_device/one_device.ino, and examples/two_devices/two_devices.ino.
518 {
519  Wire.begin();
520 }

§ device()

ADS7828 * ADS7828::device ( uint8_t  address)
static

Return pointer to device object.

Parameters
addressdevice address (0..3)
Returns
pointer to ADS7828 object
Usage:
...
// device 2 pointer
ADS7828* device2 = ADS7828::device(2);
...
Examples:
examples/two_devices/two_devices.ino.
534 {
535  return devices_[address & 0x03];
536 }
static ADS7828 * devices_[4]
Array of pointers to registered device objects.
Definition: i2c_adc_ads7828.h:319
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365

§ updateAll()

uint8_t ADS7828::updateAll ( )
static

Update all unmasked channels on all registered devices.

Required Function:
Call this or one of the update() functions from within loop() in order to read data from device(s). This is the most commonly-used device update function.
Returns
quantity of channels updated (0..32)
Usage:
...
void loop()
{
...
// update all registered ADS7828 devices/unmasked channels
uint8_t quantity = ADS7828::updateAll();
...
}
...
Examples:
examples/one_device/one_device.ino, and examples/two_devices/two_devices.ino.
557 {
558  uint8_t a, ch, count = 0;
559  for (a = 0; a < 4; a++)
560  {
561  if (0 != devices_[a]) count += update(devices_[a]);
562  }
563  return count;
564 }
static ADS7828 * devices_[4]
Array of pointers to registered device objects.
Definition: i2c_adc_ads7828.h:319
uint8_t update()
Update all unmasked channels on device.
Definition: i2c_adc_ads7828.cpp:469
Here is the call graph for this function:

§ init()

void ADS7828::init ( uint8_t  address,
uint8_t  options,
uint8_t  channelMask,
uint16_t  min,
uint16_t  max 
)
private

Common code for constructors.

Parameters
addressdevice address (0..3)
optionscommand byte bits SD, PD1, PD0
channelMaskbit positions containing a 1 represent channels that are to be read via update() / updateAll()
minminimum scaling value applied to value()
maxmaximum scaling value applied to value()
577 {
578  this->address_ = address & 0x03; // A1 A0 bits
579  this->commandByte_ = options & 0x0C; // PD1 PD0 bits
580  this->channelMask = channelMask;
581  for (uint8_t ch = 0; ch < 8; ch++)
582  {
583  channels_[ch] = ADS7828Channel(this, ch, options, min, max);
584  }
585  this->devices_[address_] = this;
586 }
ADS7828Channel channels_[8]
Array of channel objects.
Definition: i2c_adc_ads7828.h:312
uint8_t address_
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.h:309
static ADS7828 * devices_[4]
Array of pointers to registered device objects.
Definition: i2c_adc_ads7828.h:319
Definition: i2c_adc_ads7828.h:191
uint8_t commandByte_
Command byte for device object (PD1 PD0 bits only).
Definition: i2c_adc_ads7828.h:315
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365
uint8_t channelMask
Each bit position containing a 1 represents a channel that is to be read via update() / updateAll()...
Definition: i2c_adc_ads7828.h:292

§ read() [1/2]

uint16_t ADS7828::read ( )
private

Request and receive data from most-recent A/D conversion from device.

Returns
16-bit zero-padded word (12 data bits D11..D0)
592 {
593  return read(address_);
594 }
uint8_t address_
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.h:309
uint16_t read()
Request and receive data from most-recent A/D conversion from device.
Definition: i2c_adc_ads7828.cpp:591
Here is the caller graph for this function:

§ read() [2/2]

uint16_t ADS7828::read ( uint8_t  address)
staticprivate

Request and receive data from most-recent A/D conversion from device.

Parameters
addressdevice address (0..3)
Returns
16-bit zero-padded word (12 data bits D11..D0)
602 {
603  Wire.requestFrom(BASE_ADDRESS_ | (address & 0x03), 2);
604  return word(Wire.read(), Wire.read());
605 }
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365
static const uint8_t BASE_ADDRESS_
Factory pre-set slave address.
Definition: i2c_adc_ads7828.h:322

§ start() [3/3]

uint8_t ADS7828::start ( uint8_t  address,
uint8_t  command 
)
staticprivate

Initiate communication with device.

Parameters
addressdevice address (0..3)
commandcommand byte (0x00..0xFC)
Return values
0success
1length too long for buffer
2address send, NACK received (device not on bus)
3data send, NACK received
4other twi error (lost bus arbitration, bus error, ...)
617 {
618  Wire.beginTransmission(BASE_ADDRESS_ | (address & 0x03));
619  Wire.write((uint8_t) command);
620  return Wire.endTransmission();
621 }
uint8_t address()
Device address as defined by pins A1, A0.
Definition: i2c_adc_ads7828.cpp:365
static const uint8_t BASE_ADDRESS_
Factory pre-set slave address.
Definition: i2c_adc_ads7828.h:322

§ update() [3/4]

uint8_t ADS7828::update ( ADS7828 device)
staticprivate

Initiate communication with device.

Parameters
devicepointer to device object
Returns
quantity of channels updated (0..8)
628 {
629  if (0 == device) device = devices_[0];
630  uint8_t ch, count = 0;
631  for (ch = 0; ch < 8; ch++)
632  {
633  if (bitRead(device->channelMask, ch))
634  {
635  if (0 == update(device, ch)) count++;
636  }
637  }
638  return count;
639 }
static ADS7828 * devices_[4]
Array of pointers to registered device objects.
Definition: i2c_adc_ads7828.h:319
uint8_t update()
Update all unmasked channels on device.
Definition: i2c_adc_ads7828.cpp:469
uint8_t channelMask
Each bit position containing a 1 represents a channel that is to be read via update() / updateAll()...
Definition: i2c_adc_ads7828.h:292
Here is the call graph for this function:

§ update() [4/4]

uint8_t ADS7828::update ( ADS7828 device,
uint8_t  ch 
)
staticprivate

Initiate communication with device.

Parameters
devicepointer to device object
chchannel number (0..7)
Return values
0success
1length too long for buffer
2address send, NACK received (device not on bus)
3data send, NACK received
4other twi error (lost bus arbitration, bus error, ...)
651 {
652  if (0 == device) device = devices_[0];
653  uint8_t status = device->start(ch);
654  if (0 == status) device->channel(ch)->newSample(device->read());
655  return status;
656 }
static ADS7828 * devices_[4]
Array of pointers to registered device objects.
Definition: i2c_adc_ads7828.h:319
uint8_t start()
Initiate communication with device.
Definition: i2c_adc_ads7828.cpp:423
void newSample(uint16_t)
Add (unscaled) sample value to moving average array, update totalizer.
Definition: i2c_adc_ads7828.cpp:130
ADS7828Channel * channel(uint8_t)
Return pointer to channel object.
Definition: i2c_adc_ads7828.cpp:381
uint16_t read()
Request and receive data from most-recent A/D conversion from device.
Definition: i2c_adc_ads7828.cpp:591
Here is the call graph for this function:

Friends And Related Function Documentation

§ DIFFERENTIAL

const uint8_t DIFFERENTIAL = 0 << 7
related

Configure channels to use differential inputs (Command byte SD=0).

Use either DIFFERENTIAL or SINGLE_ENDED in ADS7828 constructor; default is DIFFERENTIAL.

Usage:
...
// address 0, differential inputs, ref/ADC OFF between conversions
ADS7828 adc0(0, DIFFERENTIAL | REFERENCE_OFF | ADC_OFF);
...

§ SINGLE_ENDED

const uint8_t SINGLE_ENDED = 1 << 7
related

Configure channels to use single-ended inputs (Command byte SD=1).

Use either DIFFERENTIAL or SINGLE_ENDED in ADS7828 constructor; default is DIFFERENTIAL.

Usage:
...
// address 1, single-ended inputs, ref/ADC OFF between conversions
ADS7828 adc1(1, SINGLE_ENDED | REFERENCE_OFF | ADC_OFF);
...
Examples:
examples/one_device/one_device.ino, and examples/two_devices/two_devices.ino.

§ REFERENCE_OFF

const uint8_t REFERENCE_OFF = 0 << 3
related

Configure channels to turn internal reference OFF between conversions (Command byte PD1=0).

Use either REFERENCE_OFF or REFERENCE_ON in ADS7828 constructor; default is REFERENCE_OFF.

Usage:
...
// address 0, differential inputs, ref/ADC OFF between conversions
ADS7828 adc0(0, DIFFERENTIAL | REFERENCE_OFF | ADC_OFF);
...

§ REFERENCE_ON

const uint8_t REFERENCE_ON = 1 << 3
related

Configure channels to turn internal reference ON between conversions (Command byte PD1=1).

Use either REFERENCE_OFF or REFERENCE_ON in ADS7828 constructor; default is REFERENCE_OFF.

Usage:
...
// address 2, differential inputs, ref ON/ADC OFF between conversions
ADS7828 adc2(2, DIFFERENTIAL | REFERENCE_ON | ADC_OFF);
...
Examples:
examples/one_device/one_device.ino, and examples/two_devices/two_devices.ino.

§ ADC_OFF

const uint8_t ADC_OFF = 0 << 2
related

Configure channels to turn A/D converter OFF between conversions (Command byte PD0=0).

Use either ADC_OFF or ADC_ON in ADS7828 constructor; default is ADC_OFF.

Usage:
...
// address 0, differential inputs, ref/ADC OFF between conversions
ADS7828 adc0(0, DIFFERENTIAL | REFERENCE_OFF | ADC_OFF);
...

§ ADC_ON

const uint8_t ADC_ON = 1 << 2
related

Configure channels to turn A/D converter ON between conversions (Command byte PD0=1).

Use either ADC_OFF or ADC_ON in ADS7828 constructor; default is ADC_OFF.

Usage:
...
// address 3 , differential inputs, ref OFF/ADC ON between conversions
ADS7828 adc3(3, DIFFERENTIAL | REFERENCE_OFF | ADC_ON);
...
Examples:
examples/one_device/one_device.ino, and examples/two_devices/two_devices.ino.

Member Data Documentation

§ channelMask

uint8_t ADS7828::channelMask

Each bit position containing a 1 represents a channel that is to be read via update() / updateAll().


The documentation for this class was generated from the following files: