|
pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
|
The HGC ROC has 4 MAX5825 chips doing the DAC for the bias voltages. More...
#include <Bias.h>
Public Member Functions | |
| Bias (std::shared_ptr< I2C > bias_i2c, std::shared_ptr< I2C > board_i2c) | |
| Wrap an I2C class for communicating with all the DAC chips. | |
| void | initialize () |
| Initialize to standard settings Reference voltage - 4.096V. | |
| double | readTemp () |
| int | readSiPM (uint8_t i_sipm) |
| int | readLED (uint8_t i_led) |
| void | setSiPM (uint8_t i_sipm, uint16_t code) |
| void | setLED (uint8_t i_led, uint16_t code) |
Static Public Attributes | |
| static const uint8_t | ADDR_LED_0 = 0x18 |
| DAC chip addresses. | |
| static const uint8_t | ADDR_LED_1 = 0x1A |
| static const uint8_t | ADDR_SIPM_0 = 0x10 |
| static const uint8_t | ADDR_SIPM_1 = 0x12 |
Private Attributes | |
| std::shared_ptr< I2C > | i2c_bias_ |
| std::shared_ptr< I2C > | i2c_board_ |
| std::vector< MAX5825 > | led_ |
| LED bias chips. | |
| std::vector< MAX5825 > | sipm_ |
| SiPM bias chips. | |
The HGC ROC has 4 MAX5825 chips doing the DAC for the bias voltages.
Two of the chips handle the 16 LED bias voltages and the other two handle the 16 SiPM bias voltages.
Both the LED and SiPM bias voltages are indexed from 0 to 15. To convert from that index to a chip and DAC index on that chip, just use integer division and modulus.
chip_index = int(index > 7) dac_index = index - 8*chip_index;
| pflib::Bias::Bias | ( | std::shared_ptr< I2C > | bias_i2c, |
| std::shared_ptr< I2C > | board_i2c ) |
Wrap an I2C class for communicating with all the DAC chips.
The bus is 4 + <board-number>, so we set the default to 4 for the case where we only have one board with bus number 0.
|
static |
DAC chip addresses.
DAC chip addresses taken from HGCROC specs.