?? msp430xg46x_oa_10.c
字號:
//*****************************************************************************
// MSP430xG46x Demo - OA1, Non-Inverting PGA Mode
//
// Description: Configure OA1 for Non-Inverting PGA mode. In this mode,
// the "-" terminal is connected to the R ladder tap and the OAFBRx bits
// select the gain.
// ACLK = 32.768kHz, MCLK = SMCLK = default DCO
//
// MSP430xG461x
// -------------------
// /|\| XIN|-
// | | |
// --|RST XOUT|-
// | |
// "+" -->|P6.4/OA1I0 |
// | |
// | P6.3/OA1O|--> OA1 Output
// | | Gain is 8
//
// K. Quiring/ M. Mitchell
// Texas Instruments Inc.
// October 2006
// Built with IAR Embedded Workbench Version: 3.41A
//*****************************************************************************
#include <msp430xG46x.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
OA1CTL0 = OAPM_1 + OAADC1; // Select inputs, power mode
OA1CTL1 = OAFC_4 + OAFBR_6 + OARRIP; // Mode, OAFBRx sets gain
_BIS_SR(LPM3_bits + GIE); // LPM3;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -