msp430綜合課程設計
『壹』 請問誰有《MSP430單片機常用模塊與綜合系統實例精講》pdf格式電子書
有秦龍編著07年出版的,我的號9577 0313 3
『貳』 關於msp430的課程設計
決定好做什麼了嗎
可以吧要求發給我
我做單片機的
『叄』 msp430視頻教程
學生,也還幾個G。
href="http://www.youku.com/playlist_show/id_1872796.html" http://www.youku.com/playlist_show/id_1872796.html
給你這個地址。回答在線。 。 。
『肆』 誰有《MSP430單片機C語言應用程序設計實例精講》和《MSP430單片機常用模塊與綜合系統實例精講》電子書啊
http://ishare.iask.sina.com.cn/f/12551951.html
這里有pdf
不知道是不內是容
『伍』 基於MSP430單片機的菜單程序設計思路,以及簡單示例,最好C語言程序!
我以前倒是做過,不過程序還有點問題,調時間的時候容易過界,但正常走時候就正常了。開發環境用的IAR,單片機用f149,顯示用的1602的四線模式。
你自己看著改程序吧,其實我也是51上移植過去的。
悲劇了,帖不下了.我帖在我博客里了啊,自己去找吧.
主程序
__________________________分隔線____________________________________
#include <msp430x14x.h>
#include "ds1302.h"
#include "LCD1602x4_mps.h"
#define DS1302_SECOND 0x81 //時鍾晶元的寄存器位置,存放時間
#define DS1302_MINUTE 0x83
#define DS1302_HOUR 0x85
#define DS1302_WEEK 0x8b
#define DS1302_DAY 0x87
#define DS1302_MONTH 0x89
#define DS1302_YEAR 0x8d
unsigned char DateString[11],TimeString[9],week_value[2],TempBuffer[7]; //
char hide_sec,hide_min,hide_hour,hide_day,hide_week,hide_month,hide_year;
char done,count,temp,flag,up_flag,down_flag;
//unsigned int temp_value=0,temp_max=0;temp_min=0; //溫度值
void DateToStr(void) //將時間年,月,日,星期數據轉換成液晶顯示字元串,放到數組里DateString[]
{ unsigned char Year,Month,Day,Week;
Year=rtc_getyear();
Month=rtc_getmon();
Day=rtc_getdate();
Week=rtc_getday();
if(hide_year<2) //這里的if,else語句都是判斷位閃爍,<2顯示數據,>2就不顯示,輸出字元串為 2007/07/22
{
DateString[0] = '2';
DateString[1] = '0';
DateString[2] = Year/10 + '0';
DateString[3] = Year%10 + '0';
}
else
{
DateString[0] = ' ';
DateString[1] = ' ';
DateString[2] = ' ';
DateString[3] = ' ';
}
DateString[4] = '/';
if(hide_month<2)
{
DateString[5] = Month/10 + '0';
DateString[6] = Month%10 + '0';
}
else
{
DateString[5] = ' ';
DateString[6] = ' ';
}
DateString[7] = '/';
if(hide_day<2)
{
DateString[8] = Day/10 + '0';
DateString[9] = Day%10 + '0';
}
else
{
DateString[8] = ' ';
DateString[9] = ' ';
}
if(hide_week<2)
{
week_value[0] = Week%10 + '0'; //星期的數據另外放到 week_value[]數組里,跟年,月,日的分開存放,因為等一下要在最後顯示
}
else
{
week_value[0] = ' ';
}
week_value[1] = '\0';
DateString[10] = '\0'; //字元串末尾加 '\0' ,判斷結束字元
}
void TimeToStr(void) //將時,分,秒數據轉換成液晶顯示字元放到數組 TimeString[];
{ unsigned char Hour,Minute,Second;
Hour=rtc_gethour();
Minute=rtc_getmin();
Second=rtc_getsec();
if(hide_hour<2)
{
TimeString[0] = Hour/10 + '0';
TimeString[1] = Hour%10 + '0';
}
else
{
TimeString[0] = ' ';
TimeString[1] = ' ';
}
TimeString[2] = ':';
if(hide_min<2)
{
TimeString[3] = Minute/10 + '0';
TimeString[4] = Minute%10 + '0';
}
else
{
TimeString[3] = ' ';
TimeString[4] = ' ';
}
TimeString[5] = ':';
if(hide_sec<2)
{
TimeString[6] = Second/10 + '0';
TimeString[7] = Second%10 + '0';
}
else
{
TimeString[6] = ' ';
TimeString[7] = ' ';
}
DateString[8] = '\0';
}
void show_time() //液晶顯示程序
{
TimeToStr(); //時間數據轉換液晶字元
DateToStr(); //日期數據轉換液晶字元
// ReadTemp(); //開啟溫度採集程序
// temp_to_str(); //溫度數據轉換成液晶字元
LCD_PutStr(TempBuffer,25); //顯示溫度
LCD_PutStr(DateString,0); //顯示日期
LCD_PutStr(week_value,15); //顯示星期
LCD_PutStr(" Week",10); //在液晶上顯示 字母 week
LCD_PutStr(TimeString,16); //顯示時間
}
////////////////////////////////////////////////////////////////////////////
void outkey() //跳出調整模式,返回默認顯示
{ unsigned char Second;
if (!(P1IN&BIT0))
{
count=0;
hide_sec=0,hide_min=0,hide_hour=0,hide_day=0,hide_week=0,hide_month=0,hide_year=0;
Second=dataread(DS1302_SECOND);
datawrite(0x8e,0x00); //寫入允許
datawrite(0x80,Second&0x7f);
datawrite(0x8E,0x80); //禁止寫入
done=0;//temp_max=0;sund=1;
while(!(P1IN&BIT0));
delay_nms(2);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Upkey()//升序按鍵
{
if(!(P1IN&BIT1))
{
switch(count)
{case 1:
temp=dataread(DS1302_SECOND); //讀取秒數
temp=temp+1; //秒數加1
up_flag=1; //數據調整後更新標志
if((temp&0x7f)>0x59) //超過59秒,清零
temp=0;
break;
case 2:
temp=dataread(DS1302_MINUTE); //讀取分數
temp=temp+1; //分數加1
up_flag=1;
if(temp>0x59) //超過59分,清零
temp=0;
break;
case 3:
temp=dataread(DS1302_HOUR); //讀取小時數
temp=temp+1; //小時數加1
up_flag=1;
if(temp>0x23) //超過23小時,清零
temp=0;
break;
case 4:
temp=dataread(DS1302_WEEK); //讀取星期數
temp=temp+1; //星期數加1
up_flag=1;
if(temp>0x7)
temp=1;
break;
case 5:
temp=dataread(DS1302_DAY); //讀取日數
temp=temp+1; //日數加1
up_flag=1;
if(temp>0x31)
temp=1;
break;
case 6:
temp=dataread(DS1302_MONTH); //讀取月數
temp=temp+1; //月數加1
up_flag=1;
if(temp>0x12)
temp=1;
break;
case 7:
temp=dataread(DS1302_YEAR); //讀取年數
temp=temp+1; //年數加1
up_flag=1;
if(temp>0x99)
temp=0;
break;
default:break;
}
while(!(P1IN&BIT1));
delay_nms(2);
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
void Downkey()//降序按鍵
{
if(!(P1IN&BIT2))
{
switch(count)
{case 1:
temp=dataread(DS1302_SECOND); //讀取秒數
temp=temp-1; //秒數減1
down_flag=1; //數據調整後更新標志
if((temp&0x7f)>0x59) //小於0秒,返回59秒
temp=0x59;
break;
case 2:
temp=dataread(DS1302_MINUTE); //讀取分數
temp=temp-1; //分數減1
down_flag=1;
if(temp>0x59)
temp=0x59; //小於0秒,返回59秒
break;
case 3:
temp=dataread(DS1302_HOUR); //讀取小時數
temp=temp-1; //小時數減1
down_flag=1;
if(temp==0x00)
temp=0x23;
break;
case 4:
temp=dataread(DS1302_WEEK); //讀取星期數
temp=temp-1; //星期數減1
down_flag=1;
if(temp==0x00)
temp=0x07;
break;
case 5:
temp=dataread(DS1302_DAY); //讀取日數
temp=temp-1; //日數減1
down_flag=1;
if(temp==0x00)
temp=0x31;
break;
case 6:
temp=dataread(DS1302_MONTH); //讀取月數
temp=temp-1; //月數減1
down_flag=1;
if(temp==0x00)
temp=0x12;
break;
case 7:
temp=dataread(DS1302_YEAR); //讀取年數
temp=temp-1; //年數減1
down_flag=1;
if(temp>0x99)
temp=0x99;
break;
default:break;
}
while(!(P1IN&BIT2));
delay_nms(2);
}
}
void Setkey()//模式選擇按鍵
{
if(!(P1IN&BIT3))
{
count=count+1; //Setkey按一次,count就加1
done=1; //進入調整模式
while(!(P1IN&BIT3));
delay_nms(2);
}
}
void keydone()//按鍵功能執行
{ unsigned char Second;
if(flag==0) //關閉時鍾,停止計時
{ datawrite(0x8e,0x00); //寫入允許
temp=dataread(DS1302_SECOND);
datawrite(0x80,temp|0x80);
datawrite(0x8e,0x80); //禁止寫入
flag=1;
}
Setkey(); //掃描模式切換按鍵
switch(count)
{
case 1:do //count=2,調整秒
{
outkey(); //掃描跳出按鈕
Upkey(); //掃描加按鈕
Downkey(); //掃描減按鈕
if(up_flag==1||down_flag==1) //數據更新,重新寫入新的數據
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x80,temp|0x80); //寫入新的秒數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_sec++; //位閃計數
if(hide_sec>3)
hide_sec=0;
show_time(); //液晶顯示數據
}while(count==2);break;
case 2:do //count=3,調整分
{
hide_sec=0;
outkey();
Upkey();
Downkey();
if(temp>0x60)
temp=0;
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x82,temp); //寫入新的分數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_min++;
if(hide_min>3)
hide_min=0;
show_time();
}while(count==3);break;
case 3:do //count=4,調整小時
{
hide_min=0;
outkey();
Upkey();
Downkey();
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x84,temp); //寫入新的小時數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_hour++;
if(hide_hour>3)
hide_hour=0;
show_time();
}while(count==4);break;
case 4:do //count=5,調整星期
{
hide_hour=0;
outkey();
Upkey();
Downkey();
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x8a,temp); //寫入新的星期數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_week++;
if(hide_week>3)
hide_week=0;
show_time();
}while(count==5);break;
case 5:do //count=6,調整日
{
hide_week=0;
outkey();
Upkey();
Downkey();
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x86,temp); //寫入新的日數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_day++;
if(hide_day>3)
hide_day=0;
show_time();
}while(count==6);break;
case 6:do //count=7,調整月
{
hide_day=0;
outkey();
Upkey();
Downkey();
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x88,temp); //寫入新的月數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_month++;
if(hide_month>3)
hide_month=0;
show_time();
}while(count==7);break;
case 7:do //count=8,調整年
{
hide_month=0;
outkey();
Upkey();
Downkey();
if(up_flag==1||down_flag==1)
{
datawrite(0x8e,0x00); //寫入允許
datawrite(0x8c,temp); //寫入新的年數
datawrite(0x8e,0x80); //禁止寫入
up_flag=0;
down_flag=0;
}
hide_year++;
if(hide_year>3)
hide_year=0;
show_time();
}while(count==8);break;
case 8: count=0;hide_year=0; //count8, 跳出調整模式,返回默認顯示狀態
Second=dataread(0x80);
datawrite(0x8e,0x00); //寫入允許
datawrite(0x80,Second&0x7f);
datawrite(0x8E,0x80); //禁止寫入
done=0; //temp_max=0;sund=1;
break; //count=7,開啟中斷,標志位置0並退出
default:break;
}
}
////////////////////////////////////////////////////////////////////////////
void rtcinit ()
{
rtc_wp(0);
rtc_stop(0);
rtc_charger(1,1);
}
void sysinit ()
{ WDTCTL = WDTPW + WDTHOLD; //關閉看門狗
P4OUT = 0xff;
P4DIR = 0xff;
P5OUT = 0x0f;
P5DIR = 0xf0;
P6OUT = 0xfc;
P6DIR = 0xfc;
}
void main ()
{ unsigned char temp;
sysinit ();
rtcinit ();
LCD_init(); //液晶初始化
_EINT();
while (1)
{
while(done==1)
keydone(); //進入調整模式
while(done==0)
{
temp=rtc_getsec();
delay_nms(10);
if(temp!=rtc_getsec())
show_time(); //液晶顯示數據
flag=0;
Setkey(); //掃描各功能鍵
}
}
}
『陸』 MSP430系列16位超低功耗單片機原理與實踐的內容簡介
本書融合了作者6年講授「MSP430單片機原理與應用」課程,以及多年單片機開發應用的版經驗和體會,內容上則補充、更權新了很多新的資料和實驗內容,特別是最新的無線感測器網路ZigBee、模擬器件等。書中的所有源程序代碼(匯編和C)都經過實際驗證和測試,應用舉例和綜合設計大多取材於實際應用項目,部分設計摘自TI公司的應用筆記。本書附帶的光碟上,有IAR集成開發環境EW430評估版(4KBC代碼限制),實驗系統硬體資料,以及書中基礎實驗和許多實例的完整源代碼(包括USB介面USB430、網路介面NET430等)。
本書可作為高等院校計算機、電子、自動化類專業MSP430單片機課程的教材,也適合廣大從事單片機應用系統開發工程技術人員作為學習、參考用書。
『柒』 學校要用msp430系列單片機做課題,求推薦一些簡單的
做一個溫度檢測系統
或者做一個步進電機控制系統
光強度檢測系統等
『捌』 求電子課程設計(紅外線心率計)使用msp430單片機的C語言編程代碼
你的原理圖呢,硬體是怎麼連接的,這些信息要提供一下,至少要把完整的題目要求貼上來吧!
『玖』 代做課程設計,電子,單片機,PCB,電路模擬,msp430
還是自己弄,跟同學交流一下好