国产免费AV|泡泡玛特欧洲总部将设在伦敦|中文天堂网www新版资源在线|一本久道综合在线中文|国精产品一二三产区的使用方法|香蕉鱼在线观看|www.27eee

ELEOK

標題: STM32數碼管動態顯示Proteus仿真程序+源碼 [打印本頁]

作者: 路漫漫    時間: 2020-5-24 02:15
標題: STM32數碼管動態顯示Proteus仿真程序+源碼
仿真原理圖如下(proteus仿真工程文件和源碼可到本帖附件中下載)
數碼管動態顯示仿真和源碼.rar (2.93 MB, 售價: 2 E幣)


部分源碼
  1. #include "stm32f10x.h"
  2. #include "smg.h"
  3. void SMG_Init(void)
  4. {
  5.         GPIO_InitTypeDef  GPIO_InitStructure;
  6. //使能GPIOC時鐘
  7.         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB|RCC_APB2Periph_GPIOC,
  8. ENABLE);
  9.         GPIO_InitStructure.GPIO_Pin = 0x00ff;                                        //PC0-PC7引腳配置
  10.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   //配置為推挽輸出
  11.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   //GPIOC速度為50MHz
  12. GPIO_Init(GPIOC, &GPIO_InitStructure);                                //初始化PC0-PC7
  13. GPIO_InitStructure.GPIO_Pin = 0x003f;                                        //PB0-PC5引腳配置
  14.         GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;   //配置為推挽輸出
  15.         GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;   //GPIOB速度為50MHz
  16. GPIO_Init(GPIOB, &GPIO_InitStructure);                                //初始化PB0-PB5
  17. }
復制代碼





歡迎光臨 ELEOK (http://m.afoofa.cn/) Powered by Discuz! X5.0