The detector bias will be set at the value passed from the CAN if, after this setting, it is launched instruction_Detector_bias().
The first 4 bytes of the CAN bus message are the 2 voltage setting in mV.
287 uint8_t scheda_su_giu = ((canali_input >> 7) & 1)*6;
288 uint8_t offset_scheda=0;
289 int32_t bias_to_apply,ADC_max_bias_pos, ADC_min_bias_neg;
301 if(ADC_max_bias_pos > ADC_min_bias_neg){
302 ADC_max_bias_pos=ADC_min_bias_neg;
305 if(bias_to_apply > ADC_max_bias_pos){
306 bias_to_apply=ADC_max_bias_pos;
308 ADC_max_bias_pos =bias_to_apply/1000;
309 tx_data[0]= ADC_max_bias_pos & 0xff;
310 tx_data[1]= (ADC_max_bias_pos >>8) & 0xff;
313 for( canali_=0; canali_ <6; canali_ ++){
314 if( (canali_input >> canali_) & 1){
int32_t ADC_misura_differenziale_con_media_generico(uint8_t scheda_su_scheda_giu_, uint8_t preamplifier_externalADC_1_onboardADC_0, uint8_t nodo_da_misurare, uint8_t differenziale_1_single_0)
This function sets the original gain when a few LSb have to be determined. The umber of bits is bit_t...
volatile uint16_t ADC_medie_per_misura
the number of ADC readings to average, the maximum is 400
volatile bool ADC_non_leggi_lo_offset_se_true
if not necessary, the ADC input offset from buffer is not read
uint8_t tx_data[8]
Transmission data vector.
int32_t Detector_bias_target[12]
Detector bias target values.
void instr_detector_Vbias_we_want_to_set_function(void)
#define Detector_max_limit_to_rail
#define istruzione_byte_4_e_scelta_canale
@ node_voltage_Analog_Mux_meas_input_bias_neg
@ node_voltage_Analog_Mux_meas_input_bias_pos
volatile int8_t vettore_istruzioni[8]
This is a copy of the received 8 bytes from the CAN.