欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: Proteus仿真stm32f1串口發送程序 [打印本頁]

作者: zhangzehong    時間: 2020-7-1 09:20
標題: Proteus仿真stm32f1串口發送程序
學習protues串口發送,寫下的仿真還有代碼。有興趣的師兄可以一起學習一下。仿真還有代碼在壓縮包里面

仿真原理圖如下(proteus仿真工程文件可到本帖附件中下載)


單片機源程序如下:
  1. #include "stm32f10x.h"
  2. #include "stm32f10x_it.h"
  3. #include "led.h"
  4. #include "modbus.h"
  5. #include "delay.h"

  6. void SystemTick_Configuration( void );

  7. int main(void)
  8. {       
  9.                 RCC_SYSCLKConfig(RCC_SYSCLKSource_HSI);        //設置系統時鐘HSI作為時鐘源,用protues仿真串口發送接收時必須加上
  10.                 delay_init();
  11.                 LED_Init();
  12.                 RS485_Init();
  13.                 Timer1_Init();
  14.     while (1)
  15.     {
  16.                                 USART_SendData(USART2,0x55);
  17. //                         u8 res;
  18. //       res=USART_ReceiveData(USART2); //讀接收到的字節,同時相關標志自動清除
  19. //                         USART_SendData(USART2,res);
  20. //                                        RS485_Service();
  21.                 }
  22. }
復制代碼

所有資料51hei提供下載:
仿真 - 串口發送.7z (265.46 KB, 下載次數: 60)







歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1