?? msp430x24x_mpy_07.c
字號:
//******************************************************************************
// MSP430x24x Demo - 16x16 Signed Multiply Accumulate
//
// Description: Hardware multiplier is used to multiply two numbers.
// The calculation is automatically initiated after the second operand is
// loaded. A second multiply-accumulate operation is performed after that.
// Results are stored in RESLO and RESHI. SUMEXT contains the extended sign
// of the result.
// ACLK = 32.768kHz, MCLK = SMCLK = default DCO
//
// MSP430F249
// -----------------
// /|\| |
// | | |
// --|RST |
// | |
// | |
//
// B. Nisarga
// Texas Instruments Inc.
// September 2007
// Built with IAR Embedded Workbench Version: 3.42A
//******************************************************************************
#include <msp430x24x.h>
void main(void)
{
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
MPY = 0x1234; // Load first operand -unsigned mult
OP2 = 0x5678; // Load second operand
MACS = 0x1234; // Load first operand -signed MAC
OP2 = 0x5678; // Load second operand
_BIS_SR(LPM4_bits); // LPM4
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -