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

◆ instruction_for_PGA_GAIN_set()

void instruction_for_PGA_GAIN_set ( void  )

The second stage gain is settable here.

This instruction needs to know the gain to set and the channel to apply the setting. These informztion are at byte istruzione_byte_4_e_scelta_canale and at bytes byte_istr_dati_0 and byte_istr_dati_1 of the CAN message.

Returns
No Parameters, the actual result is sent to the CAN bus output throught tx_data.
359 //This function must be optimized as it must opetrate with the x1 / x10 pre pga gain
360 //vettore_istruzioni[1]=0 means channel 0, vettore_istruzioni[1]>0 means channel 1
361 // vettore_istruzioni[2] is the MS8bits, while vettore_istruzioni[3] are the LS8bits
362 //of the gain to set.
365
366 tx_data[byte_istr_dati_0] = PGA_Gain_V_su_V[0];
367 tx_data[byte_istr_dati_1] = PGA_Gain_V_su_V[1];
368}
uint8_t tx_data[8]
Transmission data vector.
Definition: Can.c:321
void instruction_for_PGA_GAIN_set(void)
The second stage gain is settable here.
Definition: DAC_PGA.c:358
void PGA_preparation_to_gain_set(char chi_aggiustiamo, unsigned int guadagno_da_impostare)
It sets the new gain letting the output offset at the same level.
Definition: DAC_PGA.c:382
#define byte_istr_dati_1
Definition: Istruzioni.h:26
#define byte_istr_dati_0
Definition: Istruzioni.h:25
#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 358 of file DAC_PGA.c.