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

◆ instr_PGA_set_reset_pre_PGA_gain_function()

void instr_PGA_set_reset_pre_PGA_gain_function ( void  )

PGA input stage gain set.

Returns
No Parameters, the actual result is sent to the CAN bus output throught tx_data.
398 uint8_t scheda_su_scheda_giu= (canale >> 7) & 1;
399 uint8_t PGA_gain_da_impostare= vettore_istruzioni[istruzione_byte_2];
400 uint8_t offset_maintained= vettore_istruzioni[istruzione_byte_3];
401 //ATTENZIONE: se offset_maintained allora bisogna:
402 // -leggere l'offset prima di cambiare
403 // -determinare i nuovi parametri di offset
404 // -cambiare il guadagno
405 ERROR_codifica_errore(0,0,0,0); //Reset_ch0 errori
406 uint8_t set_2_reset_1_idle_0=1;
407 if (PGA_gain_da_impostare){
408 set_2_reset_1_idle_0=2;
409 }
410 for(canale_=0; canale_<6;canale_++){
411 if ((canale>> canale_) & 1) {
412 PGA_set_reset_pre_PGA_gain ( scheda_su_scheda_giu, canale_, set_2_reset_1_idle_0 );
413 }
414 }
416}
void PGA_set_reset_pre_PGA_gain(uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t set_2_reset_1_idle_0)
Here the 2 digital signals from the trimmer are exploited to set the gain of the input stage of the P...
Definition: DAC_PGA.c:143
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.
void instr_PGA_set_reset_pre_PGA_gain_function(void)
PGA input stage gain set.
Definition: Istruzioni.c:396
#define istruzione_byte_3
Definition: Istruzioni.h:23
#define istruzione_byte_2
Definition: Istruzioni.h:22
#define istruzione_byte_4_e_scelta_canale
Definition: Istruzioni.h:24
volatile int8_t vettore_istruzioni[8]
This is a copy of the received 8 bytes from the CAN.

Definition at line 396 of file Istruzioni.c.