How to retrieve 12 bits ADC values coded in 16 bits format ?

Post your MATLAB discussions here
Post Reply
Luca
Newbie
Posts: 0
Joined: Tue Apr 24, 2018 5:11 pm

How to retrieve 12 bits ADC values coded in 16 bits format ?

Post by Luca »

Hello !

I am currently dealing with the following problem : I can not figure out how 12 bits ADC output is converted in 16 bits format. Let me explain...

I am using a Pico 4224 (containing a 12 bits ADC) with Matlab. My application requires to retrieve the ADC output (12 bits integers) but the instrument driver only returns 16 bits integers in order to allow for potential averaging and resolution enhancement , and this feature seems to be deeply rooted in the driver code ( see this post : topic19821.html ). Looking at 16 bits integers provided by the driver I tried to understand how 12 bits values are scaled to 16 bits, my idea was to see if 16 bits values were regularly spaced but I could not find easily any simple pattern.

Could you explain to me how 12 bits values out of the ADC are scaled to 16 bits so that I can get them back ?

Many thanks in advance

Martyn
Site Admin
Site Admin
Posts: 4483
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: How to retrieve 12 bits ADC values coded in 16 bits form

Post by Martyn »

During factory test a digital scaling factor is calculated for each of the ranges and stored in the scope, this is applied to the ADC counts before they are returned to the application. This is necessary to ensure that the returned values are within the published specifications for the device. It is not possible to recover the original 12 bit values.
Martyn
Technical Support Manager

Post Reply