9#define bias_reading_attenuation_extern ((1.8 + 18)/1.8 )*1024.0
10#define bias_reading_attenuation ((1.5 + 8.2)/1.5 )*1024.0
13#define trimmer_bias_coarse_step (float) ((10.0*20.0/22.0/255.0)*(10.0/1.5)* 1e6 )
16#define trimmer_bias_fine_step (float) ((10.0*20.0/22.0/255.0)*(10e3/(10e3+1e6))*(10.0+1.5)/1.5*1e6 )
17#define trimmer_bias_coarse_pos 0
18#define trimmer_bias_fine_pos 2
19#define trimmer_bias_coarse_neg 1
20#define trimmer_bias_fine_neg 3
22#define Detector_min_voltage_for_switch (int32_t) 1e6
23#define Detector_max_voltage_for_switch (int32_t) 6e6
24#define Detector_max_limit_to_rail (int32_t) 0.3e6
30#define minimum_error_detector_voltage 10000
38 int32_t slope_coarse_positiva;
40 int32_t slope_coarse_negativa;
41 int32_t slope_fine_positiva;
43 int32_t slope_fine_negativa;
51 uint8_t starting_value_pos;
52 uint8_t starting_value_neg;
53 uint8_t starting_exp_value_pos;
54 uint8_t starting_exp_value_neg;
55 uint8_t target_non_raggiunto_pos;
56 uint8_t target_non_raggiunto_neg;
63extern const int32_t Detector_positive_coarse_step_trimmer[];
64extern const int32_t Detector_positive_fine_step_trimmer[];
65extern const int32_t Detector_negative_coarse_step_trimmer[];
66extern const int32_t Detector_negative_fine_step_trimmer[];
73static void Detector_aggiusta_offset_SAR(
EPROM_detector__ *EPROM_detector_sar, uint8_t scheda_su_scheda_giu_);
74static void misura_il_valore_trimmer_detector(
EPROM_detector__ *EPROM_detector_slope, uint8_t scheda_su_scheda_giu_, uint8_t canali_da_regolare, uint8_t trimmer_da_scrivere);
75static bool Detector_verifica_Vbias(uint8_t scheda_su_giu,
bool si_commuta);
85#define detector_OA_inverting_gain_x_1000 6666
86#define detector_OA_non_inverting_gain_x_1000 7666
87#define detector_fine_trimmer_attenuation 101
88#define detector_attenuazione_della_lettura_x_1000 7250
89#define detector_trimmer_attenuation_x_1000 909
91#define Detector_default_coarse_trimmer 233e5
92#define Detector_default_fine_trimmer 2720
94#define Detector_scrivi_il_trimmer 1
95#define Detector_leggi_il_trimmer 0
98#define Detector_trimmer_coarse_bias_pos (uint8_t)0
99#define Detector_trimmer_coarse_bias_neg (uint8_t)1
100#define Detector_trimmer_fine_bias_pos (uint8_t)2
101#define Detector_trimmer_fine_bias_neg (uint8_t) 3
125extern int trimmer_bias_coarse_step_actual[];
126extern int trimmer_bias_fine_step_actual[];
132void imposta_il_trimmer_del_bias(int16_t *Valori_per_i_trimmer,
long int discrepanza,
int trimmer_bias_coarse_step_singolo,
int trimmer_bias_fine_step_singolo);
int32_t Detector_bias_target[]
This is the detector bias target, not the bias set.
void instr_detector_scrittura_lettura_trimmer_bias_function(void)
This is an instruction via CAN bus to read/write the detector trimmers. It calls the detector_scrittu...
uint8_t detector_Relay_state[]
The state of the Detector realis is considerede. Note that this is the wanted working condition....
void imposta_il_trimmer_del_bias(int16_t *Valori_per_i_trimmer, long int discrepanza, int trimmer_bias_coarse_step_singolo, int trimmer_bias_fine_step_singolo)
Trimmer settings for the function instruction_Detector_bias()
void instruction_Detector_bias(void)
The detector bias is set at the value passed from the CAN.
int Detector_Voltage_Bias[]
The bias voltage applied to the detectors.
void instr_detector_Vbias_we_want_to_set_function(void)
void instr_Vbias_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_...
const struct Detector_coefficiente_type Detector_coarse_trimmer_normalizing_factor[]
Coarse trimmer, negative side, normalizing factor with repect to the positive side.
void instruction_Vbias_target(void)
The detector bias will be set at the value passed from the CAN if, after this setting,...
const struct Detector_coefficiente_type Detector_small_res_normalizing_factor[]
Small Load resistor, negative side, normalizing factor with repect to the positive resistors.
void instr_Relays_driver_set_reset_channel_function(void)
Function to set the relais for detector bias.
const struct Detector_coefficiente_type Detector_large_res_normalizing_factor[]
Large Load resistor, negative side, normalizing factor with repect to the positive resistors.