Post Go back to editing

Amperometric Measurement with different pins from the examples

Category: Software
Product Number: AD5941

Hi everyone,

I am trying to implement this example  https://github.com/analogdevicesinc/ad5940-examples/tree/master/examples/AD5940_Amperometric on my custom board. In this examples the pin used are Vzero and AIN4 but I need to use CE0 and AIN2, can somebody tell me which part of the code need to be changed so that the measurement can work? I already changed them in these part of the code and it's not working.

dsp_cfg.ADCBaseCfg.ADCMuxN = ADCMUXN_AIN2;

dsp_cfg.ADCBaseCfg.ADCMuxP = ADCMUXP_VCE0;

/*==================================================*/

sw_cfg.Dswitch = SWD_CE0;

sw_cfg.Pswitch = SWP_CE0; // Connect CE0 to P-switch

sw_cfg.Nswitch = SWN_AIN2; // Connect AIN2 to N-switch

sw_cfg.Tswitch = SWT_AIN2;

Even trying different pins I get the same results (which are basically random values so the connection is not working) In the same code I also perform an impedance measurement and that works fine on the same pins. Can somebody help me?