modm API documentation
|
Classes | |
class | modm::Ad7280a< Spi, Cs, Cnvst, N > |
Functions | |
IOStream & | modm::operator<< (IOStream &os, const ad7280a::RegisterValue &c) |
IOStream & | modm::operator<< (IOStream &os, const ad7280a::ConversionValue &c) |
enum | Cell { BALANCER_OFF = 0, CB1 = (1 << 2), CB2 = (1 << 3), CB3 = (1 << 4), CB4 = (1 << 5), CB5 = (1 << 6), CB6 = (1 << 7), BALANCER_ALL = 0xfc } |
enum | Channel { CELL_VOLTAGE_1 = 0x0, CELL_VOLTAGE_2 = 0x1, CELL_VOLTAGE_3 = 0x2, CELL_VOLTAGE_4 = 0x3, CELL_VOLTAGE_5 = 0x4, CELL_VOLTAGE_6 = 0x5, AUX_ADC_1 = 0x6, AUX_ADC_2 = 0x7, AUX_ADC_3 = 0x8, AUX_ADC_4 = 0x9, AUX_ADC_5 = 0xA, AUX_ADC_6 = 0xB, SELF_TEST = 0xC } |
enum | Register { CTRL_HB = 0xD, CTRL_LB = 0xE, CELL_OVERVOLTAGE = 0xF, CELL_UNDERVOLTAGE = 0x10, AUX_ADC_OVERVOLTAGE = 0x11, AUX_ADC_UNDERVOLTAGE = 0x12, ALERT = 0x13, CELL_BALANCE = 0x14, CB1_TIMER = 0x15, CB2_TIMER = 0x16, CB3_TIMER = 0x17, CB4_TIMER = 0x18, CB5_TIMER = 0x19, CB6_TIMER = 0x1A, PD_TIMER = 0x1B, READ = 0x1C, CNVST_CONTROL = 0x1D } |
enum | Device { MASTER = 0 } |
enum | modm::Ad7280a< Spi, Cs, Cnvst, N >::Average { modm::Ad7280a< Spi, Cs, Cnvst, N >::NO_AVERAGE = (0 << 1), modm::Ad7280a< Spi, Cs, Cnvst, N >::AVERAGE_BY_2 = (1 << 1), modm::Ad7280a< Spi, Cs, Cnvst, N >::AVERAGE_BY_4 = (2 << 1), modm::Ad7280a< Spi, Cs, Cnvst, N >::AVERAGE_BY_8 = (3 << 1) } |
lbuild module: modm:driver:ad7280a
The AD7280A is monitor for lithium ion battery packs with up to six cells. It contains six 12-ADCs with 1µs conversion per channel and a cell balancing interface. Up to 7 devices can be added through a Daisy-Chain interface (chain of 8 devices).
Recommended SPI Clk frequency is 1 MHz. With a 1 MHz Clk, it takes approximately 1.54 ms to read back the voltage conversions on 48 channels.
When addressing devices in the chain directly the frequency needs to be lower than 1 MHz because delays introduced in each stage of the chain.
enum modm::Ad7280a::Average |