This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Performing REF and ADC Calibrations with MSP430F6636

Other Parts Discussed in Thread: MSP430F6636

Hi All,

I am trying to understand how to calibrate the REF and ADC on the MSP430F6636. I have read through the user's guide (MSP430x5xx/MSP430x6xx Family Rev. J) and several posts on this forum. I feel like I have a pretty good understanding of how to go about calibrating these modules, but there is one thing that I am unsure of that I will blame on my poor C knowledge. On page 52 of the user's manual it gives the following example:

In the following example, the integrated 1.5-V reference voltage is used during a conversion.
• Conversion result: 0x0100 = 256 decimal
• Reference voltage calibration factor (CAL_15VREF_FACTOR) : 0x7BBB
The following steps show how the ADC conversion result can be corrected:
• Multiply the conversion result by 2 (this step simplifies the final division): 0x0100 x 0x0002 = 0x0200
• Multiply the result by CAL_15VREF_FACTOR: 0x200 x 0x7FEE = 0x00F7_7600
• Divide the result by 216: 0x00F7_7600 / 0x0001_0000 = 0x0000_00F7 = 247 decimal

My question is how can the second to last line be performed on a 16 bit MCU? This results in a number larger than 2^16. I would think that that would cause and overflow and give an invalid number. Could anyone explain how to perform a mathematical operation like this where the result is larger than 2^16?

Thanks, 

  • Zack Bomsta said:
    My question is how can the second to last line be performed on a 16 bit MCU?

    The MSP430F6636 contains the 32-Bit Hardware Multiplier (MPY32) module, which contains a 16×16 Multiplier which produces a 32-bit result. See the MSP430x5xx/MSP430x6xx Family User's Guide SLAU208J for details.

**Attention** This is a public forum