AnsweredAssumed Answered

QN908x: getting simple 16bit ADC result

Question asked by Arpad Toth on Aug 16, 2018
Latest reply on Aug 20, 2018 by Felipe Garcia

How to format the ADC result value to a simple unsigned 16bit preferably without float operation on QN908x?

 

Datasheet says:

The ADC result is 23-bit signed fractional data, with the MSB (bit 22) as the sign, while the output data to MCU is 32-bit.

ADC_OUTPUT[31:9]: ADC_DATA[22:0]

ADC_OUTPUT[8:0]: 0x00

 

I'm interested in 0-65535 range.

 

  rawADCval = ADC_GetConversionResult(ADC);

Outcomes