pflib v2.7.0-1-gd371ab6a
Polarfire Interaction Library
pflib::Bias Class Reference

The HGC ROC has 4 MAX5825 chips doing the DAC for the bias voltages. More...

#include <Bias.h>

Public Member Functions

 Bias (I2C &i2c, int bus=4)
 Wrap an I2C class for communicating with all the DAC chips. More...
 
void initialize ()
 Initialize to standard settings Reference voltage - 4.096V.
 
void cmdLED (uint8_t i_led, uint8_t cmd, uint16_t twelve_bit_setting)
 Pass a setting to one LED DAC.
 
void cmdSiPM (uint8_t i_sipm, uint8_t cmd, uint16_t twelve_bit_setting)
 Pass a setting to one SiPM DAC.
 
void setLED (uint8_t i_led, uint16_t code)
 Set and load the passed CODE for an LED bias. More...
 
void setSiPM (uint8_t i_sipm, uint16_t code)
 Set and load the passed CODE for an SiPM bias. More...
 

Static Public Attributes

static const uint8_t ADDR_LED_0 = 0x18
 DAC chip addresses. More...
 
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::vector< MAX5825led_
 LED bias chips.
 
std::vector< MAX5825sipm_
 SiPM bias chips.
 

Detailed Description

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;

Constructor & Destructor Documentation

◆ Bias()

pflib::Bias::Bias ( I2C i2c,
int  bus = 4 
)

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.

Member Function Documentation

◆ setLED()

void pflib::Bias::setLED ( uint8_t  i_led,
uint16_t  code 
)

Set and load the passed CODE for an LED bias.

Uses MAX5825::CODEn_LOADn

This is a common procedure and operates as an example of how to use setLED.

◆ setSiPM()

void pflib::Bias::setSiPM ( uint8_t  i_sipm,
uint16_t  code 
)

Set and load the passed CODE for an SiPM bias.

Uses MAX5825::CODEn_LOADn

This is a common procedure and operates as an example of how to use setSiPM.

Member Data Documentation

◆ ADDR_LED_0

const uint8_t pflib::Bias::ADDR_LED_0 = 0x18
static

DAC chip addresses.

DAC chip addresses taken from HGCROC specs.


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