Hi all,
I am using qn908xcdk_driver_examples_adc_burst demo code for my development.
The demo code is a single-ended mode.
In my application, I want to get the ADC result by "differential mode".
Find from the UM11023 document (p418)
If I want to use the ADC input for differential mode, the following parameters I need to follow
ex.
Channel index : 2
Register bit : CH_SEL[2]
Positive input Vin+ : ADC4/PA08
Negative input Vin- : ADC5/PA09
So I changed the following parameters in code
In pin_mux.c
1. Add #define PIN9_IDX 9u for Negative input Vin-
2. Add portA_pin9_config
I want to add a new pin 9 for doing differential mode
Is there any wrong for the changing ?
Or any else parameter need to change ?
Can someone help me ?
Or is there any sample code for QN9080 ADC differential mode ?
Thanks,
Annie
Hello,
I believe it should be enough, are you having troubles when configuring it?
Regards,
Estephania
Hello,
I do some experiments for it.
The following step that I tried.
1. In adc_burst.c
#define DEMO_ADC_CHANNEL 8 ---> DEMO_ADC_CHANNEL 0
2. In pin_mux.c
< change >
#define PIN8_IDX 8u
---->
#define PIN0_IDX 0u
#define PIN1_IDX 1u
< add >
3. I input the testing signal from the function generator agilent 33220A
with some setting
Is there something wrong, I saw the output signal is a little like a sine wave with the setting,
But it seem to couple with some impulse signal.
And how would it usually be tested in a differential mode?
I'm not sure my experiment step is correct.
Hello,
If you make a bypass and get the signal out through the DAC, do you have the same result as getting the signal from Matlab ?
Regards ,
Estephania
Hi Estephania,
I'm new for this, so I didn't know how to do through DAC.
And is that possible be corrupted by 60Hz Power-Line Interference?
Thanks,
Annie
Hello,
Which 60Hz Power-Line Interference are you referring to?
Regards ,
Estephania
Hi Estephania,
Here is the step I have tried.
I think that I didn't change to the differential mode successfully.
Is there any wrong for the changing ?
Or any else parameter need to change ?
I also found some code may need to change, but I'm not sure.
Like
convMode = kADC_ConvModeSingle <= Is it need to change to kADC_ConvModeBurstScan ?
It has defined to port and pin to be 8 <= Is it need to change or add another pin and port ?
And I also want to ask for this function - IOCON_SetPinMuxing
Thanks for helping me.
Annie.