-
大小: 193.63 KB文件類型: .rar金幣: 1下載: 0 次發(fā)布日期: 2025-01-03
- 語言: 其他
- 標(biāo)簽: 開發(fā)技術(shù)??C??
資源簡介
IAR平臺工程代碼,基于MSP430G2553的藍(lán)牙控制小車,可以使用手機(jī)實(shí)現(xiàn)小車左右前后及自動避障功能。
代碼片段和文件信息
#include?“msp430g2553.h“
#include?“L298N.h“
#include?“UARTA0.H“
//-----------------------------------------------
//?函數(shù)名稱:??SysClock
//?函數(shù)功能:?系統(tǒng)時(shí)鐘初始化
//?入口參數(shù):?無?
//?返回參數(shù):?無?
//?作????者:??2014/9/16?by?QUENTIN
//?備????注:?無?
//?示????例:??
//-----------------------------------------------
void?SysClock?(void)
{
??BCSCTL2?=?SELM_0?|?DIVM_0?|?DIVS_0;
??
??if?(CALBC1_16MHZ?!=?0xFF)?
??{
????__delay_cycles(100000);
????DCOCTL?=?0x00;
????BCSCTL1?=?CALBC1_16MHZ;?????/*?Set?DCO?to?16MHz?*/
????DCOCTL?=?CALDCO_16MHZ;
??}
??
??BCSCTL1?|=?XT2OFF?|?DIVA_0;
??BCSCTL3?=?XT2S_0?|?LFXT1S_2?|?XCAP_1;
}
void?main(?void?)
{
??//?Stop?watchdog?timer?to?prevent?time?out?reset
??WDTCTL?=?WDTPW?+?WDTHOLD;
??SysClock();
??InitL298NPort();
???InitUartA0();
????UCA0TXBUF?=?‘q‘;????????//?測試發(fā)送Ok
???StartSendStr_A0();
???_EINT();
??while(1)
??{
//????GoAhead?(?);????????????//?前進(jìn)
//????DelayMs(500);??
//????GoBack?();?????????????//?后退
//????DelayMs(500);
//????TurnLeft?();???????????//?左轉(zhuǎn)
//????DelayMs(500);
//????TurnRight?();??????????//?右轉(zhuǎn)
//????DelayMs(500);
//????Stop?();???????????????//?停車
//????DelayMs(500);???
??}
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????4650??2014-09-16?16:29??BluetoothCar\BluetoothCar.dep
?????文件??????20124??2014-09-16?14:26??BluetoothCar\BluetoothCar.ewd
?????文件??????50417??2014-09-16?15:11??BluetoothCar\BluetoothCar.ewp
?????文件????????166??2014-09-16?14:47??BluetoothCar\BluetoothCar.eww
?????文件??????22519??2014-09-16?15:47??BluetoothCar\Debug\Exe\BluetoothCar.d43
?????文件?????291065??2014-09-16?15:48??BluetoothCar\Debug\Obj\BluetoothCar.pbd
?????文件?????291065??2014-09-16?15:48??BluetoothCar\Debug\Obj\BluetoothCar.pbd.browse
?????文件?????238565??2014-09-16?15:39??BluetoothCar\Debug\Obj\fifo.pbi
?????文件???????9613??2014-09-16?15:39??BluetoothCar\Debug\Obj\fifo.pbi.cout
?????文件??????10152??2014-09-16?15:39??BluetoothCar\Debug\Obj\fifo.r43
?????文件?????243357??2014-09-16?15:43??BluetoothCar\Debug\Obj\L298N.pbi
?????文件???????9614??2014-09-16?15:43??BluetoothCar\Debug\Obj\L298N.pbi.cout
?????文件??????12316??2014-09-16?15:43??BluetoothCar\Debug\Obj\L298N.r43
?????文件?????220473??2014-09-16?15:45??BluetoothCar\Debug\Obj\main.pbi
?????文件???????9609??2014-09-16?15:45??BluetoothCar\Debug\Obj\main.pbi.cout
?????文件???????6110??2014-09-16?15:45??BluetoothCar\Debug\Obj\main.r43
?????文件???????9613??2014-09-16?15:03??BluetoothCar\Debug\Obj\uart.pbi.cout
?????文件?????224965??2014-09-16?15:48??BluetoothCar\Debug\Obj\UARTA0.pbi
?????文件???????9615??2014-09-16?15:47??BluetoothCar\Debug\Obj\UARTA0.pbi.cout
?????文件???????8131??2014-09-16?15:47??BluetoothCar\Debug\Obj\UARTA0.r43
?????文件???????1224??2014-09-16?15:45??BluetoothCar\main.c
?????文件??????????0??2014-09-16?15:47??BluetoothCar\path.txt
?????文件???????1480??2014-09-16?16:29??BluetoothCar\settings\BluetoothCar.cspy.bat
?????文件??????11128??2014-09-16?16:29??BluetoothCar\settings\BluetoothCar.dbgdt
?????文件???????1268??2014-09-16?16:29??BluetoothCar\settings\BluetoothCar.dni
?????文件???????4809??2014-09-16?16:29??BluetoothCar\settings\BluetoothCar.wsdt
?????文件???????4338??2014-09-16?15:39??BluetoothCar\src\fifo.c
?????文件???????1193??2014-09-08?15:34??BluetoothCar\src\fifo.h
?????文件???????4674??2014-09-16?15:43??BluetoothCar\src\L298N.C
?????文件???????1007??2014-09-16?15:36??BluetoothCar\src\L298N.h
............此處省略12個(gè)文件信息
評論
共有 條評論
相關(guān)資源
- VisualStudioUninstaller vs卸載工具
- 金蝶K3wise數(shù)據(jù)字典
- DAC0832波形發(fā)生器幅值及頻率都精確可
- 安卓QQ6.71協(xié)議源碼易語言,qq協(xié)議源碼
- 編譯原理實(shí)驗(yàn)工具及參考源碼(lex&
- E盾偷后臺工具源碼
- Zprotect專業(yè)版(無限制) 一機(jī)一碼E
- WPF USB 網(wǎng)絡(luò) 串口 通信軟件
- Servlet API中文文檔
- 組態(tài)王驅(qū)動開發(fā)包3.0.0.7(中文)
- stm32f030 IAP Demo(原創(chuàng))
- 用python編寫的移動彩信的發(fā)送程序
- SSM+Shiro+redis實(shí)現(xiàn)單點(diǎn)登陸
- WPE三件套(WPE+CCP+E2G)冰楓修改版
- TCL-S1916 ,1924交換機(jī)管理程序
- 飛思卡爾單片機(jī)MC9S12XS12G128驅(qū)動(硬件
- VNCX
- 多窗口后臺鼠標(biāo)連點(diǎn)器
- jstl-api-1.2和jstl-impl-1.2
- 精美千年登陸器(自動更新).rar
- Crystal Impact Match!2.1.3 試用延長
- CASS9.1最新S4數(shù)據(jù)及驅(qū)動+ET199數(shù)據(jù)及驅(qū)
- 使用選擇性重傳協(xié)議實(shí)現(xiàn)UDP可靠通信
- 一個(gè)超簡單的企業(yè)管理系統(tǒng)(帶ACCE
- 實(shí)現(xiàn)小波變換例子 upcoef 函數(shù)
- 類pascal語言編譯器(編譯原理實(shí)驗(yàn))
- DELPHI與西門子200PLC的串口通信實(shí)例
- mybatis連接oracle實(shí)例
- 單片機(jī)和adc0809數(shù)字電壓表
- 信號估計(jì)DOAmusicespritcapon