Store the system state or recover and apply the system state.
528uint8_t set_1_store_0 , uint8_t startup_1_user_0){
530 uint8_t dati_da_leggere[4],ii_,canale,dati_da_scrivere[]={0,0,0,0},esegui=0;
531 uint16_t memoria_per_trimmer, memoria_per_abilitazione, memoria_per_relay_PGA,memoria_per_detector_trimmer;
532 if(scheda_su_scheda_giu) scheda_su_scheda_giu=6;
534 if( startup_1_user_0){
537 memoria_per_relay_PGA=0;
539 }
else if(startup_1_user_0 ==0){
547 if ((set_1_store_0 ==0) && esegui){
548 for(canale=0;canale<6;canale++){
549 if((canali_da_regolare >> canale) &1 ){
551 memoria_per_abilitazione , dati_da_scrivere);
554 if (memoria_per_relay_PGA){
557 dati_da_scrivere[2]= 0;
558 dati_da_scrivere[3]= 0;
560 memoria_per_relay_PGA , dati_da_scrivere);
561 dati_da_scrivere[0]= 0;
562 dati_da_scrivere[1]= 0;
570 if (set_1_store_0 && esegui){
571 for(canale=0;canale<6;canale++){
572 if((canali_da_regolare >> canale) &1 ){
574 memoria_per_abilitazione , dati_da_leggere);
575 if(*(uint32_t *)dati_da_leggere ==0){
577 memoria_per_trimmer , dati_da_leggere);
578 for(ii_=0;ii_<4;ii_++){
582 if(memoria_per_relay_PGA){
584 memoria_per_relay_PGA , dati_da_leggere);
585 PGA_GAIN_CROSS( scheda_su_scheda_giu, canale, dati_da_leggere[1] );
586 for(ii_=0;ii_<7;ii_++){
587 if( (dati_da_leggere[0] >> ii_) & 1){
592 memoria_per_detector_trimmer , dati_da_leggere);
593 for(ii_=0;ii_<4;ii_++){
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...
uint8_t PGA_settled_gain[12]
PGA set gain.
uint8_t detector_Relay_state[12]
The state of the Detector realis is considerede. Note that this is the wanted working condition....
void Relays_driver_set_reset_channel(uint8_t scheda_su_giu, uint8_t numero_canale, uint8_t valore_da_trasmettere)
Setting the state of the detector realis: pre connected to detector or intrnal resistor,...
void EPROM_lettura_M24C32_64(uint8_t scheda_su_scheda_giu_, uint8_t mainboard_postmainboard, uint8_t canale, short indirizzo_memoria, uint8_t *dati_letti)
Read from preamplifier and on-board flashes.
void EPROM_scrittura_M24C32_64(uint8_t scheda_su_scheda_giu, uint8_t mainboard_postmainboard, uint8_t canale, short indirizzo_memoria, uint8_t *dati_da_scrivere)
Wriring the EEPROM.
void EPROM_store_recover_state_M24C32_64(uint8_t scheda_su_scheda_giu, uint8_t canali_da_regolare, uint8_t set_1_store_0, uint8_t startup_1_user_0)
Store the system state or recover and apply the system state.
@ Memory_preamplifier_user_detector_trimmer
detector trimmer content is stored here
@ Memory_preamplifier_startup_offset_trimmer
startup offset trimmer active if zero
@ Memory_preamplifier_user_offset_trimmer_ON_0_OFF_ff
user offset trimmer active if zero
@ Memory_preamplifier_startup_offset_trimmer_ON_0_OFF_ff
startup offset trimmer active if zero
@ Memory_preamplifier_user_offset_trimmer
startup offset trimmer active if zero
@ Memory_preamplifier_user_detector_and_gain
detectro setup anf PGA gain at user location
#define preamplifier_scrivi_il_trimmer
uint8_t contenuto_trimmer_detector[12][4]
Content of the trimmer for detector bias system.
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...
uint8_t volatile contenuto_trimmer_preamplifier[12][4]
void preamplifier_scrittura_lettura_trimmer(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 preamplifier trimmer, the contents of the trimmers are stored in...