Post Go back to editing

Amperometric Measurement with different pins from the examples

Thread Summary

The user is trying to modify the AD5940 Amperometric example to use CE0 and AIN2 instead of Vzero and AIN4. The final answer confirms that the measurement is actually performed via SE0, CE0, and RE0, and suggests that the user can short CE0 and RE0 via software using the Switch Matrix. The accompanying answer clarifies the misunderstanding about the original pin usage and suggests checking the Switch Matrix configuration for correct pin connections.
AI Generated Content
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?

Parents Reply Children