Hi,
I cannot understand how the fractional mode of the hardware multiplier of cc430f6137 work. So I need some help.
It is introduced in cc430 family user guide. And here is the source code for cc430f6137 fractional mode multiplication in CCS.
I want to know why we just can get the result from RESHI and meanwhile ignoring RESLO?
//******************************************************************************
// CC430F613x Demo - Fractional mode, Q15 multiplication
//
// Description: The example illustrates multiplication of 2 Q15 numbers in
// fractional mode. The result is a Q15 (15 bit) number stored in the RES1
// register. It can be viewed in the debugger window.
//
//
// ACLK = 32.768kHz, MCLK = SMCLK = default DCO
//
// CC430F6137
// -----------------
// /|\| |
// | | |
// --|RST |
// | |
// | |
//
// M Morales
// Texas Instruments Inc.
// April 2009
// Built with CCE Version: 3.2.2 and IAR Embedded Workbench Version: 4.11B
//******************************************************************************
#include "cc430x613x.h"
unsigned int Result_Q15;
void main(void)
{
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
MPY32CTL0 = MPYFRAC; // Set fractional mode
MPYS = 0x7D70; // Load first operand
OP2 = 0x1000; // Load second operand
Result_Q15 = RESHI; // Q15 result
MPY32CTL0 &= ~MPYFRAC;
__bis_SR_register(LPM4_bits); // Enter LPM4
__no_operation(); // For debugger
}
Please explain more detailed.
Regards,
Can