lolxnano
Code to control the LoLX SiPM biasing board from the connected nanoPi
Loading...
Searching...
No Matches
AD5686R Class Reference

Class specific to the AD5686R DAC. More...

#include <ad56x6.h>

Inheritance diagram for AD5686R:
Collaboration diagram for AD5686R:

Public Member Functions

 AD5686R (NanoPi &np, int cs)
 
bool SetInternalRef (bool on=true)
 
uint16_t GetSetting (double v, unsigned short chan)
 Calibration specific to the HV DAC.
 
double GetVoltage (uint16_t s, unsigned short chan)
 Calibration specific to the HV DAC.
 
void SetCalib (std::vector< double > sl, std::vector< double > offs)
 
bool EnableHV (bool on=true)
 Turn HV amplifier on/off.
 
bool DisableHV ()
 
bool IsHVEnabled ()
 Check status of output 3, return whether it is HIGH (HV enabled) or LOW (HV disabled)
 
- Public Member Functions inherited from AD56x6
 AD56x6 (NanoPi &np, int cs)
 Constructor.
 
unsigned char * AssembleWord (uint8_t cmd, uint8_t chan, uint16_t *data=NULL)
 Assembles the SPI word from command, channel, and data.
 
bool Set (unsigned short chan, uint16_t setting, bool confirm=true)
 Sets the selected DAC channel to a value, confirms with readback.
 
bool RampVoltage (unsigned short chan, uint16_t vset=-1, unsigned int steps=16, unsigned int tdelay=500)
 Test method to ramp through voltage settings.
 
void PowerOn ()
 Send POWER_UP command to DAC.
 
uint16_t GetData ()
 Extract 16 bit setting from readback word.
 
void Readback (short ch=-1)
 Read back DAC settings and write them to vector readback.
 

Additional Inherited Members

- Public Attributes inherited from AD56x6
const uint16_t vfull = 0xffff
 Full scale output.
 
const uint8_t nbytes = 3
 Size of data word in bytes.
 
std::vector< uint16_t > readback
 Read back DAC settings after Readback() was called.
 
- Protected Attributes inherited from AD56x6
uint32_t bits = 0
 
NanoPinanoPi = NULL
 
const int cselect
 
bool verbose = false
 

Detailed Description

Class specific to the AD5686R DAC.

Used for the HV DAC on the LoLX SiPM board.

Member Function Documentation

◆ EnableHV()

bool AD5686R::EnableHV ( bool on = true)

Turn HV amplifier on/off.

DAC channel 3 is used as a digital switch to turn the HV supply on/off. This is done to ensure the HV is off when the board is powered up. We can not guarantee the nanoPi itself doesn't set arbitrary pins to HIGH during the boot process.

◆ GetSetting()

uint16_t AD5686R::GetSetting ( double v,
unsigned short chan )
virtual

Calibration specific to the HV DAC.

Implements AD56x6.

◆ GetVoltage()

double AD5686R::GetVoltage ( uint16_t s,
unsigned short chan )
virtual

Calibration specific to the HV DAC.

Implements AD56x6.

◆ SetCalib()

void AD5686R::SetCalib ( std::vector< double > sl,
std::vector< double > offs )
inline
Parameters
offsMethod to change the calibration constants

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