資源簡介
本實驗代碼是基于寄存器編寫的,通過IO口模擬輸出,利用定時器設置波特率,從而實現(xiàn)通信,可以理解成真正的串口。通俗易懂,深入淺出,適合剛上手STM8開發(fā)板的小伙伴,此外,改模板還可移植到實際工程中。

代碼片段和文件信息
/********************?(C)?COPYRIGHT??風馳iCreate嵌入式開發(fā)工作室?***************************
?*?文件名??:clk_conf.c
?*?描述????:時鐘配置函數(shù)庫???
?*?實驗平臺:iCreate?STM8開發(fā)板
?*?寄存器版本??:V1.0.0
?*?作者????:ling_guansheng??QQ:779814207
?*?博客????:
?*修改時間?:2011-12-20
****************************************************************************************/
#include?“clk_conf.h“
void?Clk_conf(void)
{
??CLK_CKDIVR&=?(uint8_t)(~0x18);/*使能內部時鐘*/
??CLK_CKDIVR|=?(uint8_t)0x00;/*設置時鐘為內部16M高速時鐘*/
??
}
/*******************?(C)?COPYRIGHT?風馳iCreate嵌入式開發(fā)工作室?*****END?OF?FILE****/
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-04-14?20:02??STM8_Demo\
?????目錄???????????0??2019-04-16?15:35??STM8_Demo\Project\
?????文件???????41957??2012-06-14?02:52??STM8_Demo\Project\Backup?(2)?of?STM8_Demo.ewp
?????文件???????11254??2012-06-14?02:52??STM8_Demo\Project\Backup?of?STM8_Demo.ewd
?????文件???????41957??2012-06-14?02:52??STM8_Demo\Project\Backup?of?STM8_Demo.ewp
?????文件???????????3??2019-04-14?21:08??STM8_Demo\Project\BuildLog.log
?????目錄???????????0??2019-04-14?20:04??STM8_Demo\Project\Debug\
?????目錄???????????0??2019-04-16?16:52??STM8_Demo\Project\Debug\Exe\
?????文件????????2708??2019-04-16?16:52??STM8_Demo\Project\Debug\Exe\STM8_Demo.hex
?????文件???????65776??2019-04-16?16:52??STM8_Demo\Project\Debug\Exe\STM8_Demo.out
?????目錄???????????0??2019-04-14?20:04??STM8_Demo\Project\Debug\List\
?????目錄???????????0??2019-04-16?17:24??STM8_Demo\Project\Debug\Obj\
?????文件????????4628??2019-04-14?21:00??STM8_Demo\Project\Debug\Obj\clk_conf.o
?????文件??????227771??2019-04-14?21:00??STM8_Demo\Project\Debug\Obj\clk_conf.pbi
?????文件???????10071??2013-06-06?14:40??STM8_Demo\Project\Debug\Obj\clk_conf.pbi.cout
?????文件???????11305??2019-04-14?21:00??STM8_Demo\Project\Debug\Obj\clk_conf.pbi.xcl
?????文件???????32928??2019-04-16?16:52??STM8_Demo\Project\Debug\Obj\iouart.o
?????文件??????263125??2019-04-16?17:03??STM8_Demo\Project\Debug\Obj\iouart.pbi
?????文件???????11303??2019-04-16?17:03??STM8_Demo\Project\Debug\Obj\iouart.pbi.xcl
?????文件???????16318??2019-04-14?21:25??STM8_Demo\Project\Debug\Obj\led.o
?????文件??????229323??2019-04-14?21:24??STM8_Demo\Project\Debug\Obj\led.pbi
?????文件???????11300??2019-04-14?21:24??STM8_Demo\Project\Debug\Obj\led.pbi.xcl
?????文件????????8445??2019-04-16?16:43??STM8_Demo\Project\Debug\Obj\main.o
?????文件??????262598??2019-04-16?17:06??STM8_Demo\Project\Debug\Obj\main.pbi
?????文件???????10067??2013-06-06?14:40??STM8_Demo\Project\Debug\Obj\main.pbi.cout
?????文件???????11301??2019-04-16?17:06??STM8_Demo\Project\Debug\Obj\main.pbi.xcl
?????文件???????53790??2019-04-16?16:43??STM8_Demo\Project\Debug\Obj\stm8s_interruput.o
?????文件??????264941??2019-04-16?17:24??STM8_Demo\Project\Debug\Obj\stm8s_interruput.pbi
?????文件???????11313??2019-04-16?17:24??STM8_Demo\Project\Debug\Obj\stm8s_interruput.pbi.xcl
?????文件??????272378??2019-04-16?17:24??STM8_Demo\Project\Debug\Obj\STM8_Demo.pbd
?????文件??????272378??2019-04-16?17:24??STM8_Demo\Project\Debug\Obj\STM8_Demo.pbd.browse
............此處省略47個文件信息
評論
共有 條評論