首先电脑能识别430,写好的程序也下载进去啦,断电后再想烧程序,软件已经无法识别,提示could not find device,程序如下#include "msp430x21x2.h"void Init_Clk(void);//void InitPIN(void);void InitADC10(void);void OpenADC10(void);void key_num(void);void low_cut(void);void db_decay(void);void m_direct(void);void big_signal(void);void pwm(unsigned int,unsigned int);//unsigned int dec,unsigned int dir)void inv_voltage(void);void Delay(unsigned short time);unsigned int ad_value[8],dec=200,dir=200,c_dec,c_dir;unsigned char v1[5];unsigned char v2[5];unsigned char direct=1,decay=1, cut=1;unsigned char key=0,key0=0,key1=1,key2=2,key3=3,key4=4,key5=5,key6=6;void main(){ //Init_Clk(); P3DIR |=0X7F; P1DIR |=0X07; P1DIR |=0X20; P3OUT =0X00; P2DIR |=0X20; InitADC10(); Delay(1); //pwm(dec,dir); for (;;) { OpenADC10(); //inv_voltage(); key_num(); low_cut(); db_decay(); m_direct(); big_signal();
}}
void Init_Clk(void){ unsigned int i ; WDTCTL = WDTPW + WDTHOLD; BCSCTL1 |= XT2OFF; do { IFG1 &= ~OFIFG; // 清除OSCFault标志 for (i = 0xff; i > 0; i--); } while ((IFG1 & OFIFG) != 0); // 如果OSCFault =1 BCSCTL2 |= SELM_1; }
下载的是这个程序,我把初始化
//Init_Clk();给去掉了,看门狗没有停掉,可这也不至于JTAG口识别不了msp430f2122吧,现在片子无法识别,真是麻烦呀~~请大家帮帮忙~~大家都没有出现第一次软件能识别,等把程序烧进去之后无法识别430的情况吗????
此帖出自
小平头技术问答
一周热门 更多>