求大神指点

[复制链接]
1142|7
 楼主| 我爱开口笑 发表于 2016-5-29 22:56 来自手机 | 显示全部楼层 |阅读模式
用msp430f149坐频率计。程序如图。我用FET硬件仿真调试程序,在单步执行中断时,执行不下去,出现以下提示.
Failed to set hardware breakpoint. All available resources are already in use.
Virtual breakpoints can be enabled in Options dialog under Debugger->FET Debugger->Breakpoints

Performance warning: Lack of breakpoints forces single-stepping.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
 楼主| 我爱开口笑 发表于 2016-5-29 23:02 来自手机 | 显示全部楼层
#include <msp430f149.h> #include "LCD1602.h" #include <stdio.h> unsigned int N1; unsigned int new_cap=0; unsigned int old_cap=0; long data; float num; const char table1[]="f:"; char buff[60]; void main() {   char i;   P6DIR |= BIT2;P6OUT |= BIT2;       WDTCTL = WDTPW + WDTHOLD;      BCSCTL2=SELS+DIVS0+DIVS1;      P1DIR&=~(BIT2); P1SEL|=BIT2;  LCD1602_Init() ;  TACTL=TASSEL_2+MC_2+TAIE+TACLR;  TACCTL1=CM_1+SCS+CCIS_1+CAP+CCIE;  LCD1602_WriteCMD(0x80);                //显示开及光标设置       for(i=0;i<sizeof(table1);i++)         LCD1602_WriteDAT(table1[i]);     _EINT(); while(1)  {  data=1000000/data;     if(data>1000)      {        num=data/1000.0;         sprintf(buff,"%5.1fKHz",num);      }      else          sprintf(buff,"%ldHz",data);       Displaystr(0,3,buff);  }  } #pragma vector=TIMERA1_VECTOR __interrupt void Timer_A(void) {   switch(TAIV)   {     case 2:           new_cap=TACCR1;            data=65536*N1+new_cap-old_cap;             old_cap=new_cap;            N1=0;             break;     case 4:break;     case 10:N1++;             break;   default:break;            }  }
dirtwillfly 发表于 2016-5-30 08:52 | 显示全部楼层
两个图看不清,程序格式都乱了
dirtwillfly 发表于 2016-5-30 08:53 | 显示全部楼层
dirtwillfly 发表于 2016-5-30 08:54 | 显示全部楼层
i1mcu 发表于 2016-5-30 22:14 | 显示全部楼层
这个看起来好困难的
i1mcu 发表于 2016-5-30 22:15 | 显示全部楼层
你看看是不是仿真的这个程序呢
yyj8902 发表于 2016-5-31 18:32 | 显示全部楼层
我爱开口笑 发表于 2016-5-29 23:02
#include  #include "LCD1602.h" #include  unsigned int N1; unsigned int new_cap=0; unsigned int old_c ...

你这代码也太乱了。点击代码编辑器,复制进去代码就看的清晰了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

4

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部