Author Topic: ADC normalisation  (Read 10971 times)

evanh

  • Jr. Member
  • Posts: 59
  • y=A+B*(1-cos(2*Pi*x))
    • View Profile
ADC normalisation
« on: November 11, 2005, 03:45:23 AM »
This is a recommendation:

The instruction manual states clearly that the normalisation is a simple bit shift that scales the value up to 12 bit resolution.  No complaints with the documentation.

However, I feel it'd be better if the scaling stretched to the full range of the 12 bit resolution.  It'd be a two or three instruction operation instead of the existing one instruction.  Something like:  
Code: [Select]
CopyOfADC = RealADC[x];  InternalADC[x] = (CopyOfADC << 2) | (CopyOfADC >> 8);

Cheers,
Evan
« Last Edit: November 11, 2005, 03:54:46 AM by evanh »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:ADC normalisation
« Reply #1 on: November 14, 2005, 02:27:02 PM »
Do you mean stretching to 16-bit resolution?
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

evanh

  • Jr. Member
  • Posts: 59
  • y=A+B*(1-cos(2*Pi*x))
    • View Profile
Re:ADC normalisation
« Reply #2 on: November 14, 2005, 06:51:44 PM »
Nope, 16 bit would be: ... (CopyOfADC << 6) | (CopyOfADC >> 4);

Note the span of 10 bits, the size of the real sample, when combining the two bit shifts.  The down shift isn't nessasary but does create the additional linear stepping throughout the full dynamic range.


Evan