CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches
Preamplifier_Offset_Drift_Correcttion.c File Reference
#include "tutti_gli_header.h"

Go to the source code of this file.

Macros

#define numero_ripetizioni   3
 
#define bit_to_go   3
 

Functions

void instr_ouput_offset_we_want_to_set_function (void)
 The preamplifier offset will be set at the value passed from the CAN with this function if, after this setting, it is launched instr_Vbias_to_be_set_function().
 
void instr_preamplifier_scrittura_lettura_trimmer_offset_function (void)
 Content of the preamplifier trimmers can be read/write.
 
void instr_output_offset_to_be_set_function (void)
 The detector bias will be set at the value set with the function instr_detector_Vbias_we_want_to_set_function() with which the target values are stored in the vector Detector_bias_target[].
 
void preamplifier_trova_il_guess (uint8_t trimmer_da_usare)
 

 
static void preamplifier_normalize_gain_offset_error (uint8_t scheda_su_scheda_giu_)
 The ouput offset will be set at the value that was given with the instr_ouput_offset_we_want_to_set instruction.
 
void preamplifier_aggiusta_offset_SAR (void)
 This function provide the output offset with the standard SAR method.
 
void preamplifier_ritorno_al_gain_originale (uint8_t scalata, uint8_t indice_trimmer, uint8_t *target_raggiunto_1_non_raggiunto_0)
 This function sets the original gain when a few LSb have to be determined. The umber of bits is bit_to_go.
 
int32_t preamplifier_ADC_external_measured_node_function (uint8_t scheda_su_scheda_giu, uint8_t indice)
 This function provide node reading from an external ADC.
 
void preamplifier_determina_trimmer_therma_comp (uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t valore_previsto_trimmer_offset, uint8_t solo_recupero_default_comp_se_1)
 This function determines and set the thermal compensation trimmer.
 

Variables

volatile uint16_t preamplifier_attesa_tra_le_misure = 10
 
int32_t preamplifier_error_voltage = 10000
 
uint8_t preamplifier_canali_da_regolare = 0
 
uint8_t preamplifier_externalADC_1_onboardADC_0
 
volatile int32_t preamplifier_Output_offset_target_at_the_moment [12]
 
volatile uint8_t termalizzazione_fatta [12]
 
int32_t preamplifier_error_voltage_at_the_moment [12]
 
int32_t preamplifier_error_voltage_at_PGA_gain [12]
 
int32_t ADC_misura_fatta_old [12] ={0,0,0,0,0,0,0,0,0,0,0,0}
 
int32_t preamplifier_coarse_step_trimmer []
 
int32_t preamplifier_fine_step_trimmer []
 
struct preamplifier_SAR_ini_type preamplifier_SAR_ini [12]
 
uint8_t PGA_settled_gain_old [12]
 
uint8_t preamplifier_canali_da_regolare_old
 
int32_t preamplifier_Output_offset_target [12] ={0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0}
 Offset target values.