This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C8051F060 ADC calibration

Hello,
In our production process there are some C8051F060-based devices
which encounter ADC none-linearity issues.
When reviewing the Calibration section at the user manual's ADC chapter it isn't totally clear which steps are needed to be done.

in the user's manual, page 66 appears:
If linearity calibrations are desired, they can be initiated by setting the ADCnLCAL
bit to ‘1’. When the calibration is finished, the ADCnLCAL bit will be set to ‘0’ by the hardware.

Is that all that is needed to be done? Is there no need to
set the ADC0CPT and ADC0CCF for linearity calibration purpose, but only for the gain and offset calibration?

Will this piece of code be enough? -

  // Switch to ADC0 Page
   SFRPAGE = ADC0_PAGE;

   // ADC0 Disabled, Timer3 start-of-conversion
   // track 16 SAR clocks before data conversion
   // upon Timer3 OV. DMA will enable ADC as needed
   ADC0CN = 0x44;

   // turn on bias generator and internal reference.
   REF0CN = 0x03;
   // Wait for Vref to settle (large cap used on target board)
   for(i = 0; i < 10000 ;i++);

   // Single-ended mode
   AMX0SL = 0x00;
   // Select SAR clock frequency =~ 25MHz
   ADC0CF = 0x00;

   ADC0LCAL = 1;                        // Initiate linearity calibration
   while(ADC0LCAL != 1)
   // restore SFRPAGE
   SFRPAGE = old_SFRPAGE;

Thanks,
Amitai

  • Keil didn't write that manual, and Keil don't make that chip - this has nothing to do with Keil.

    For clarification of a manufacturer's documentation and product-specific features & procedures, you need to contact the manufacturer - in this case, SiLabs

    See 'Community & Support' at https://www.silabs.com/