CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ instr_detector_scrittura_lettura_trimmer_bias_function()

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_scrittura_lettura_trimmer_bias(). A copy of the trimmers values is in the array contenuto_trimmer_detector[][].

Returns
No Parameters, the actual result is sent to the CAN bus output throught tx_data.
985 uint8_t contenuto_trimmer= vettore_istruzioni[byte_istr_dati_0];
986 uint8_t trimmer_da_scrivere= vettore_istruzioni[istruzione_byte_3];
987 uint8_t scrivere_leggere= (canale >> 6) & 1;
988 uint8_t scheda_su_giu= ((canale >> 7) & 1)*6;
989 ERROR_codifica_errore(0,0,0,0); //Reset_ch0 errori
990
991 for ( canale_=0; canale_ <6; canale_++){
992 if ( (canale >> canale_) & 1){
993 detector_scrittura_lettura_trimmer_bias( scheda_su_giu, canale_, trimmer_da_scrivere, \
994 contenuto_trimmer, scrivere_leggere );
995 tx_data[byte_istr_dati_0]= contenuto_trimmer_detector[canale_ + scheda_su_giu][trimmer_da_scrivere] ;
996 break ;
997 }
998 }
1000}
uint8_t tx_data[8]
Transmission data vector.
Definition: Can.c:321
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...
void Error_imposta_la_istruzione(void)
Function to be located at the end of every instruction to mark the error, if any.
void ERROR_codifica_errore(uint8_t scheda_su_scheda_giu, unsigned char error_addres, unsigned char code_to_shift, uint8_t reset_count_se_0)
If an error is found its flag is codified here.
#define istruzione_byte_3
Definition: Istruzioni.h:23
#define byte_istr_dati_0
Definition: Istruzioni.h:25
#define istruzione_byte_4_e_scelta_canale
Definition: Istruzioni.h:24
uint8_t contenuto_trimmer_detector[12][4]
Content of the trimmer for detector bias system.
Definition: Trimmer.c:161
void detector_scrittura_lettura_trimmer_bias(uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t trimmer, uint8_t valore, uint8_t scrivi_1_leggi_0)
Setting the value of any trimmer for detector biasing, the contents of the trimmers are stored in the...
Definition: Trimmer.c:238
volatile int8_t vettore_istruzioni[8]
This is a copy of the received 8 bytes from the CAN.

Definition at line 983 of file Detector_Bias.c.