-
下来看看
-
kakn ka
-
msp430 4 系列吧 15UA在吗 LM3 一秒更新一次显示,功耗在 15UA 左右
-
你那个是官方的板子是不开源的
,除了5528还有一个单片机做升压。你的IDE的版本是多少?低版本可以的。
-
xxxlzjxxx 发表于 2016-11-8 17:07
IDE提示无法设置电压,需要先用430 flasher把 EZFET_LITE_Rev1_1_BSL_1_1.txt 这个BSL刷进去,再刷 ...
是的 最新的IAR 和CCS 都是提示无法设置电压,底板版本是可以的。先在官方有不自持了,TI 他妈的真是蛋疼。别人的都开源。
-
这些汇编写的,为了更加精确,
-
链接过期了
-
关键是刷新时间是多少?
-
下来看看
-
这个程序一值在while里,除非你IIC有数据传来,
在while里处理你程序 “主程序就一直停在这个接收中断处了”除非你在中断里睡眠了
这么简单的问题, 你是小白吧
-
你用iic中断接收,
while(1)
{
循环语句;
}
#pragma vector = USCI_B0_VECTOR
void __attribute__ ((interrupt(USCI_B0_VECTOR))) USCIB0_ISR (void)
{
switch(__even_in_range(UCB0IV, USCI_I2C_UCBIT9IFG))
{
case USCI_NONE: break; // Vector 0: No interrupts
case USCI_I2C_UCALIFG: break; // Vector 2: ALIFG
case USCI_I2C_UCNACKIFG: // Vector 4: NACKIFG
UCB0CTL1 |= UCTXSTT; // I2C start condition
break;
case USCI_I2C_UCSTTIFG: break; // Vector 6: STTIFG
case USCI_I2C_UCSTPIFG: break; // Vector 8: STPIFG
case USCI_I2C_UCRXIFG3: break; // Vector 10: RXIFG3
case USCI_I2C_UCTXIFG3: break; // Vector 14: TXIFG3
case USCI_I2C_UCRXIFG2: break; // Vector 16: RXIFG2
case USCI_I2C_UCTXIFG2: break; // Vector 18: TXIFG2
case USCI_I2C_UCRXIFG1: break; // Vector 20: RXIFG1
case USCI_I2C_UCTXIFG1: break; // Vector 22: TXIFG1
case USCI_I2C_UCRXIFG0: // Vector 24: RXIFG0
处理发送数据; // Get RX data
break;
case USCI_I2C_UCTXIFG0: break; // Vector 26: TXIFG0
case USCI_I2C_UCBCNTIFG: // Vector 28: BCNTIFG
break;
case USCI_I2C_UCCLTOIFG: break; // Vector 30: clock low timeout
case USCI_I2C_UCBIT9IFG: break; // Vector 32: 9th bit
default: break;
}
}
-
谢谢楼主
-
关键是官方例程和手册有差距
-
楼上我说的是内核电压与MCLK频率关系,5529MCLK频率除了和供电压有关,还和内核电压有关,还有就是5529内核电压是可调的,不是说不可调,下面也是官方例子5529MCLK=25M 内核电压就提升了,我不理解的是提升内核电压阀值和官方例子不同。*******************************************************************************
*
* MSP430 CODE EXAMPLE DISCLAIMER
*
* MSP430 code examples are self-contained low-level programs that typically
* demonstrate a single peripheral function or device feature in a highly
* concise manner. For this the code may rely on the device's power-on default
* register values and settings such as the clock configuration and care must
* be taken when combining code from several examples to avoid potential side
* effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
* for an API functional library-approach to peripheral configuration.
*
* --/COPYRIGHT--*/
//******************************************************************************
// MSP430F552x Demo - Software Toggle P1.1 with 25MHz DCO
//
// Description: Toggle P1.1 by xor'ing P1.1 inside of a software loop.
// ACLK is rought out on pin P1.0, SMCLK is brought out on P2.2, and MCLK
// is brought out on pin P7.7.
// ACLK = REFO = 32kHz, MCLK = SMCLK = 25MHz
//
// MSP430F5529
// -----------------
// /|\| |
// | | P1.0|-->ACLK
// --|RST P7.7|-->MCLK
// | P2.2|-->SMCLK
// | |
// | P1.1|-->Port Pin toggle
//
// Bhargavi Nisarga
// Texas Instruments Inc.
// April 2009
// Built with CCSv4 and IAR Embedded Workbench Version: 4.21
//******************************************************************************
#include
void SetVcoreUp (unsigned int level);
int main(void)
{
volatile unsigned int i;
WDTCTL = WDTPW+WDTHOLD; // Stop WDT
P1DIR |= BIT1; // P1.1 output
P1DIR |= BIT0; // ACLK set out to pins
P1SEL |= BIT0;
P2DIR |= BIT2; // SMCLK set out to pins
P2SEL |= BIT2;
P7DIR |= BIT7; // MCLK set out to pins
P7SEL |= BIT7;
// Increase Vcore setting to level3 to support fsystem=25MHz
// NOTE: Change core voltage one level at a time..
SetVcoreUp (0x01);
SetVcoreUp (0x02);
SetVcoreUp (0x03);
UCSCTL3 = SELREF_2; // Set DCO FLL reference = REFO
UCSCTL4 |= SELA_2; // Set ACLK = REFO
__bis_SR_register(SCG0); // Disable the FLL control loop
UCSCTL0 = 0x0000; // Set lowest possible DCOx, MODx
UCSCTL1 = DCORSEL_7; // Select DCO range 50MHz operation
UCSCTL2 = FLLD_0 + 762; // Set DCO Multiplier for 25MHz
// (N + 1) * FLLRef = Fdco
// (762 + 1) * 32768 = 25MHz
// Set FLL Div = fDCOCLK/2
__bic_SR_register(SCG0); // Enable the FLL control loop
// Worst-case settling time for the DCO when the DCO range bits have been
// changed is n x 32 x 32 x f_MCLK / f_FLL_reference. See UCS chapter in 5xx
// UG for optimization.
// 32 x 32 x 25 MHz / 32,768 Hz ~ 780k MCLK cycles for DCO to settle
__delay_cycles(782000);
// Loop until XT1,XT2 & DCO stabilizes - In this case only DCO has to stabilize
do
{
UCSCTL7 &= ~(XT2OFFG + XT1LFOFFG + DCOFFG);
// Clear XT2,XT1,DCO fault flags
SFRIFG1 &= ~OFIFG; // Clear fault flags
}while (SFRIFG1&OFIFG); // Test oscillator fault flag
while(1)
{
P1OUT ^= BIT1; // Toggle P1.1
__delay_cycles(600000); // Delay
}
}
void SetVcoreUp (unsigned int level)
{
// Open PMM registers for write
PMMCTL0_H = PMMPW_H;
// Set SVS/SVM high side new level
SVSMHCTL = SVSHE + SVSHRVL0 * level + SVMHE + SVSMHRRL0 * level;
// Set SVM low side to new level
SVSMLCTL = SVSLE + SVMLE + SVSMLRRL0 * level;
// Wait till SVM is settled
while ((PMMIFG & SVSMLDLYIFG) == 0);
// Clear already set flags
PMMIFG &= ~(SVMLVLRIFG + SVMLIFG);
// Set VCore to new level
PMMCTL0_L = PMMCOREV0 * level;
// Wait till new level reached
if ((PMMIFG & SVMLIFG))
while ((PMMIFG & SVMLVLRIFG) == 0);
// Set SVS/SVM low side to new level
SVSMLCTL = SVSLE + SVSLRVL0 * level + SVMLE + SVSMLRRL0 * level;
// Lock PMM registers for write access
PMMCTL0_H = 0x00;
}
-
建议用弱光太阳能电池版,段式LCD
-
功能多的,容量大时,用库函数,功能少,容量小时,用寄存器
-
串口在ACLK时钟下 LPM3可以工作
-
两秒和选择时钟有关
-
你这是看门狗定时器,为什是2S和时钟有关
-
1秒钟