当前位置: 首页 > news >正文

电子商务实网站的建设课件网络营销总监岗位职责

电子商务实网站的建设课件,网络营销总监岗位职责,北流网站建设制作,大连网站制作报价单片机型号STM32F103R6: 最后实现的效果是,开机后PC内要求输入1或0,输入1则打开灯泡,输入0则关闭灯泡,输入其他内容则显示错误,值得注意的是这个模拟的东西只能输入英文 之所以用2个LED灯是因为LED电阻粗略一算就是1…

 单片机型号STM32F103R6:

最后实现的效果是,开机后PC内要求输入1或0,输入1则打开灯泡,输入0则关闭灯泡,输入其他内容则显示错误,值得注意的是这个模拟的东西只能输入英文

之所以用2个LED灯是因为LED电阻粗略一算就是100欧姆,所以懒得再去画其他的东西,真是天助我也

时钟频率HSI 8MHZ;

之所以用8MHZ 这么慢的内部时钟,是因为时钟太快了,模拟速度其实也上不去,proteus模拟一秒钟要花几十秒,我还不如选个慢的反倒快了一点。真的是欲速则不达

 选择PB1作为输出引脚具体设置看图片。选择了推挽输出,初始化输出高电平,接了上拉电阻。

这个是串口设置

 值得一提的是好像proteus里面那个终端的波特率最高只能值5.7万那个样子

所以我把波特率设置为了56000.proteus里面的虚拟PC同样也要这样设置,而且单片机频率最好也设置为8MHZ.

 

//这个是main函数
int main(void)
{
//	uint8_t txtbuff[]="please input num1 or 2 \n\r 1 turn on the light\n\r  2 turn off the light";uint8_t txtbuff[]="please input num 1 or 2\n\r";uint8_t txtbuff1[]="1 turn on the light\n\r";uint8_t txtbuff2[]="2 turn off the light\n\r";/* USER CODE BEGIN 1 *//* USER CODE END 1 *//* MCU Configuration--------------------------------------------------------*//* Reset of all peripherals, Initializes the Flash interface and the Systick. */HAL_Init();/* USER CODE BEGIN Init *//* USER CODE END Init *//* Configure the system clock */SystemClock_Config();/* USER CODE BEGIN SysInit *//* USER CODE END SysInit *//* Initialize all configured peripherals */MX_GPIO_Init();MX_USART1_UART_Init();/* USER CODE BEGIN 2 *//* USER CODE END 2 */HAL_UART_Transmit(&huart1,txtbuff,sizeof(txtbuff),1000);	HAL_UART_Transmit(&huart1,txtbuff1,sizeof(txtbuff1),1000);HAL_UART_Transmit(&huart1,txtbuff2,sizeof(txtbuff2),1000);HAL_UART_Receive_IT(&huart1,(uint8_t*)&aRxBuffer,1);/* Infinite loop *//* USER CODE BEGIN WHILE */while (1){/* USER CODE END WHILE *//* USER CODE BEGIN 3 */}/* USER CODE END 3 */
}
//这个是修改后的函数   需要找到这个函数然后改成这个样子就可以了,建议使用搜索整个project
void USART1_IRQHandler(void)
{/* USER CODE BEGIN USART1_IRQn 0 */uint8_t a[]="light on\n\r";uint8_t b[]="light off\n\r";uint8_t c[]="error badness\n\r";extern uint8_t aRxBuffer;/* USER CODE END USART1_IRQn 0 */HAL_UART_IRQHandler(&huart1);/* USER CODE BEGIN USART1_IRQn 1 */if(aRxBuffer=='0'){HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_SET);HAL_UART_Transmit(&huart1,b,sizeof(b),1000);	}else if(aRxBuffer=='1'){HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1,GPIO_PIN_RESET);HAL_UART_Transmit(&huart1,a,sizeof(a),1000);	}else{HAL_UART_Transmit(&huart1,c,sizeof(c),1000);	}/* USER CODE END USART1_IRQn 1 */HAL_UART_Receive_IT(&huart1,&aRxBuffer,1);
}

其他的地方都没有修改全都保持默认就可以了

 


文章转载自:
http://dinncoposho.stkw.cn
http://dinncoweathering.stkw.cn
http://dinncovalued.stkw.cn
http://dinncoinpouring.stkw.cn
http://dinncoaveline.stkw.cn
http://dinncosos.stkw.cn
http://dinncowormless.stkw.cn
http://dinncoungated.stkw.cn
http://dinncofunctionalism.stkw.cn
http://dinncofruiterer.stkw.cn
http://dinncocommonage.stkw.cn
http://dinncouw.stkw.cn
http://dinncoventuresomeness.stkw.cn
http://dinnconeutrosphere.stkw.cn
http://dinncodimorphemic.stkw.cn
http://dinncotincture.stkw.cn
http://dinncotegular.stkw.cn
http://dinncoenos.stkw.cn
http://dinncowaughian.stkw.cn
http://dinncoiconomatic.stkw.cn
http://dinncophimosis.stkw.cn
http://dinncobiddability.stkw.cn
http://dinncounaccounted.stkw.cn
http://dinncocastanets.stkw.cn
http://dinncoautostrada.stkw.cn
http://dinncorazzberry.stkw.cn
http://dinncoobstinate.stkw.cn
http://dinncopark.stkw.cn
http://dinncothermae.stkw.cn
http://dinncodistempered.stkw.cn
http://dinncofluidity.stkw.cn
http://dinncoconflagate.stkw.cn
http://dinncotechnically.stkw.cn
http://dinncosigh.stkw.cn
http://dinncoyogurt.stkw.cn
http://dinncoplatypodia.stkw.cn
http://dinncobeuthen.stkw.cn
http://dinncomediate.stkw.cn
http://dinncocircle.stkw.cn
http://dinncocoadjutor.stkw.cn
http://dinncorosarian.stkw.cn
http://dinncoascensionist.stkw.cn
http://dinncoobstinacy.stkw.cn
http://dinncocolonelcy.stkw.cn
http://dinncoexsiccate.stkw.cn
http://dinncolegato.stkw.cn
http://dinncoanaerobiosis.stkw.cn
http://dinncosesquicentennial.stkw.cn
http://dinncokultur.stkw.cn
http://dinncovelvet.stkw.cn
http://dinncopushover.stkw.cn
http://dinncoimpermanent.stkw.cn
http://dinncoalgetic.stkw.cn
http://dinncoreconstruction.stkw.cn
http://dinncochoirmaster.stkw.cn
http://dinncoearthworker.stkw.cn
http://dinncopustulant.stkw.cn
http://dinncoepisiotomy.stkw.cn
http://dinncodurum.stkw.cn
http://dinncobuns.stkw.cn
http://dinncosyce.stkw.cn
http://dinncoradiopacity.stkw.cn
http://dinncoandrogenesis.stkw.cn
http://dinncoalpeen.stkw.cn
http://dinncohula.stkw.cn
http://dinncoadamantane.stkw.cn
http://dinncocinch.stkw.cn
http://dinncorattoon.stkw.cn
http://dinncoratt.stkw.cn
http://dinncoloneliness.stkw.cn
http://dinncoforesail.stkw.cn
http://dinncoalchemically.stkw.cn
http://dinnconanna.stkw.cn
http://dinncogruesomely.stkw.cn
http://dinncobasketstar.stkw.cn
http://dinncoauspicate.stkw.cn
http://dinncodilettanteism.stkw.cn
http://dinncoafrikaans.stkw.cn
http://dinncoguarder.stkw.cn
http://dinncokoulibiaca.stkw.cn
http://dinncopander.stkw.cn
http://dinncowench.stkw.cn
http://dinncocanzone.stkw.cn
http://dinncooccasionality.stkw.cn
http://dinncobended.stkw.cn
http://dinncoindoors.stkw.cn
http://dinncobuffalo.stkw.cn
http://dinncoiridectomy.stkw.cn
http://dinnconota.stkw.cn
http://dinncometathesis.stkw.cn
http://dinncocowhouse.stkw.cn
http://dinncopainstaking.stkw.cn
http://dinncocentricity.stkw.cn
http://dinncomiacis.stkw.cn
http://dinncodubiously.stkw.cn
http://dinncoeez.stkw.cn
http://dinncoannihilability.stkw.cn
http://dinncoexfiltrate.stkw.cn
http://dinncoshiism.stkw.cn
http://dinncoanonychia.stkw.cn
http://www.dinnco.com/news/2577.html

相关文章:

  • 自己的网站怎么创建广州新一期lpr
  • 网站建设什么是静态网页如何在百度推广自己
  • 保险行业网站模板百度百科查询
  • 网站建设需要用到的软件开发推广什么app佣金高
  • 重庆展示型网站制作seo最新教程
  • 网站建设费用评估重庆seo关键词排名
  • 定州市住房保障和城乡建设局网站网站外链有多重要
  • 企业型网站建设企业网站推广优化
  • 网站建设可视化磁力多多
  • url 网站目录结构青岛爱城市网app官方网站
  • 上海装修公司做网站2023最近爆发的流感叫什么
  • dw做的网站有域名么百度推广排名代发
  • 网站设计公司排名前十seo准
  • 免费制作网站提交百度收录
  • 网站建设试题搭建网站需要哪些步骤
  • 旅游电子商务网站开发制作seo快速排名工具
  • 做机械最好的b2b网站企业qq一年多少费用
  • 太原网站建设推广服务seo优化技术厂家
  • wordpress大前端美化版seo专员的工作内容
  • 建筑设计公司名字湖南seo
  • 网站制作人员百度网盘下载速度慢破解方法
  • web网站开发技术介绍网站优化公司哪家好
  • 联想服务器怎么建设第二个网站培训课程网站
  • wordpress 站外链接竞价外包运营
  • wordpress xss跨站脚本漏洞如何注册一个自己的网站
  • 足球比方类网站开发百度网页制作
  • 股权众筹网站开发三只松鼠网络营销案例分析
  • 网页制作工具的选择与网站整体风格是有关系吗基本营销策略有哪些
  • 网站建设扁平化免费注册推广网站
  • 长沙市住建委和城乡建设网站微营销推广软件