QN9080 ADC differential mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

QN9080 ADC differential mode

1,746 Views
anniehung05911
Contributor II

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-

pastedImage_2.png

2.  Add portA_pin9_config

pastedImage_3.png

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

Labels (1)
6 Replies

1,409 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

I believe it should be enough, are you having troubles when configuring it? 

Regards, 
Estephania 

0 Kudos
Reply

1,409 Views
anniehung05911
Contributor II

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 >

pastedImage_3.png

3. I input the testing signal from the function generator agilent 33220A

with some setting

pastedImage_4.png

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.

0 Kudos
Reply

1,409 Views
estephania_mart
NXP TechSupport
NXP TechSupport

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 

0 Kudos
Reply

1,409 Views
anniehung05911
Contributor II

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

0 Kudos
Reply

1,409 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello, 

Which 60Hz Power-Line Interference are you referring to? 

Regards ,
Estephania 

0 Kudos
Reply

1,409 Views
anniehung05911
Contributor II

Hi Estephania,

Here is the step I have tried.

pastedImage_1.pngpastedImage_2.pngpastedImage_3.png

pastedImage_1.png

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

pastedImage_2.png

convMode = kADC_ConvModeSingle  <= Is it need to change to kADC_ConvModeBurstScan ?

pastedImage_3.png

It has defined to port and pin to be 8 <= Is it need to change or add another pin and port ?

pastedImage_4.png

And I also want to ask for this function - IOCON_SetPinMuxing

Thanks for helping me.

Annie.

0 Kudos
Reply