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

◆ PGA_GAIN_CROSS()

void PGA_GAIN_CROSS ( uint8_t  scheda_su_scheda_giu,
uint8_t  canale,
uint8_t  PGA_gain_to_set 
)

Here the 2 digital signals from the trimmer are exploited to set the gain of the input stage of the PGA.

Parameters
[in]scheda_su_scheda_giuOne of the 2 boards that the postfrontend manages
[in]canaleThe channel for which we need to manage the trimmer
[in]PGA_gain_to_setThe overal gain to set
Returns
No Parameters
109void PGA_GAIN_CROSS(uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t PGA_gain_to_set ){
110 uint8_t PGA_gain_for_second_stage=PGA_set_pre_pga_low_gain;
111 uint8_t offset_schdea=0;
112 if (scheda_su_scheda_giu){
113 offset_schdea =6;
114 scheda_su_scheda_giu=6;
115 }
116
117
118 PGA_settled_gain[canale + offset_schdea]= PGA_gain_to_set;
119 if( PGA_gain_to_set >= PGA_pre_PGA_max_gain){
120 PGA_set_reset_pre_PGA_gain ( scheda_su_scheda_giu, canale, PGA_set_pre_pga_high_gain );//first stage of PGA at max gain
121 PGA_gain_for_second_stage=PGA_pre_PGA_max_gain; //Communication of the gain set at first stega of PGA, to be used from PGA_DAC_GAIN_CROSS()
122 }else{
123 PGA_set_reset_pre_PGA_gain ( scheda_su_scheda_giu, canale, PGA_set_pre_pga_low_gain ); //First stage of PGA at small gain
124 }
125 PGA_DAC_GAIN_CROSS( scheda_su_scheda_giu, canale, PGA_gain_to_set, PGA_gain_for_second_stage);
126
127// int ciccia= ADC_lettura_registro(0,0,ADC_channel_conversion_time_FW_ch0_register);
128
129}
void PGA_GAIN_CROSS(uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t PGA_gain_to_set)
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:109
uint8_t PGA_settled_gain[12]
PGA set gain.
Definition: DAC_PGA.c:95
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 PGA_DAC_GAIN_CROSS(uint8_t scheda_su_scheda_giu, uint8_t canale, uint8_t guadagno_da_impostare, uint8_t PGA_si_NO)
Definition: DAC_PGA.c:193
#define PGA_pre_PGA_max_gain
Definition: DAC_PGA.h:21
#define PGA_set_pre_pga_low_gain
Set the amplifier gain in front of the PGA to 1 V/V, it is left shifted once in the trimmer.
Definition: DAC_PGA.h:8
#define PGA_set_pre_pga_high_gain
Set the amplifier gain in front of the PGA to 10 V/V, it is left shifted once in the trimmer.
Definition: DAC_PGA.h:7

Definition at line 109 of file DAC_PGA.c.