2021-08-15 14:49:25 索煒達電子 722
項目編號:E113
文件大?。?83K
源碼說明:帶中文注釋
開發(fā)環(huán)境:C編譯
簡要概述:
實現(xiàn)思路
-IO口模擬串口的思路也比較簡單,一切按串口協(xié)議進行操作即可。
-對于發(fā)送,計算好不同波特率對應(yīng)的延時時間進行數(shù)據(jù)發(fā)送。
-對于接收,稍微復(fù)雜。通過外部中斷檢測接收管腳的下降沿,檢測到起始信號后開啟定時器,定時器按照波特率設(shè)定好時間,每隔一段時間進入定時器中斷接收數(shù)據(jù),完成一個字節(jié)后關(guān)閉定時器。
測試Demo說明
TXD : PC13
RXD : PB14
波特率:9600 ,1-8-N
Demo功能
接收11個數(shù)據(jù),然后把接收到的數(shù)據(jù)發(fā)送出去
文件列表:
目錄│文件列表:
└ SoftWareSerial
│ keilkilll.bat
├ CORE
│ │ core_cm3.c
│ │ core_cm3.h
│ └ startup_stm32f10x_hd.s
├ OBJ
│ │ SoftWareSerial.hex
│ └ Template.hex
├ STM32F10x_FWLib
│ ├ inc
│ │ │ misc.h
│ │ │ stm32f10x_adc.h
│ │ │ stm32f10x_bkp.h
│ │ │ stm32f10x_can.h
│ │ │ stm32f10x_cec.h
│ │ │ stm32f10x_crc.h
│ │ │ stm32f10x_dac.h
│ │ │ stm32f10x_dbgmcu.h
│ │ │ stm32f10x_dma.h
│ │ │ stm32f10x_exti.h
│ │ │ stm32f10x_flash.h
│ │ │ stm32f10x_fsmc.h
│ │ │ stm32f10x_gpio.h
│ │ │ stm32f10x_i2c.h
│ │ │ stm32f10x_iwdg.h
│ │ │ stm32f10x_pwr.h
│ │ │ stm32f10x_rcc.h
│ │ │ stm32f10x_rtc.h
│ │ │ stm32f10x_sdio.h
│ │ │ stm32f10x_spi.h
│ │ │ stm32f10x_tim.h
│ │ │ stm32f10x_usart.h
│ │ └ stm32f10x_wwdg.h
│ └ src
│ │ misc.c
│ │ stm32f10x_adc.c
│ │ stm32f10x_bkp.c
│ │ stm32f10x_can.c
│ │ stm32f10x_cec.c
│ │ stm32f10x_crc.c
│ │ stm32f10x_dac.c
│ │ stm32f10x_dbgmcu.c
│ │ stm32f10x_dma.c
│ │ stm32f10x_exti.c
│ │ stm32f10x_flash.c
│ │ stm32f10x_fsmc.c
│ │ stm32f10x_gpio.c
│ │ stm32f10x_i2c.c
│ │ stm32f10x_iwdg.c
│ │ stm32f10x_pwr.c
│ │ stm32f10x_rcc.c
│ │ stm32f10x_rtc.c
│ │ stm32f10x_sdio.c
│ │ stm32f10x_spi.c
│ │ stm32f10x_tim.c
│ │ stm32f10x_usart.c
│ └ stm32f10x_wwdg.c
├ SYSTEM
│ ├ delay
│ │ │ delay.c
│ │ └ delay.h
│ ├ sys
│ │ │ sys.c
│ │ └ sys.h
│ └ usart
│ │ usart.c
│ └ usart.h
└ USER
│ JLinkSettings.ini
│ main.c
│ SoftWareSerial.uvguix.Administrator
│ SoftWareSerial.uvguix.Tony
│ SoftWareSerial.uvoptx
│ SoftWareSerial.uvprojx
│ stm32f10x.h
│ stm32f10x_conf.h
│ stm32f10x_it.c
│ stm32f10x_it.h
│ system_stm32f10x.c
└ system_stm32f10x.h