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

网站设计编辑网络营销案例分析题及答案

网站设计编辑,网络营销案例分析题及答案,做网站asp,个人如何在企业网站做实名认证Cubemx配置 打开cubemx。 前面的配置与前文一样,这里主要配置基本定时器的定时功能。 1.在Timer中点击TIM6,勾选activated。配置Parameter Settings中的预分频器(PSC)和计数器(auto-reload Register) 补…

Cubemx配置

打开cubemx。

前面的配置与前文一样,这里主要配置基本定时器的定时功能。

1.在Timer中点击TIM6,勾选activated。配置Parameter Settings中的预分频器(PSC)和计数器(auto-reload Register)

补充:

定时器工作频率=内部总线频率/PSC+1

定时频率=定时器工作频率/Period+1  =内部总线频率/((PSC+1)*(Period+1 ))

示例:总线频率80MHz,预分频80-1,重装载1000-1

定时频率= 80M/80*1000=1khz 周期为1ms

2.配置PSC为80-1,计数器为1000-1。

3.将自动重装载(auto-reload )设置为使能(Enable)。

4.点击NVIC Settings,勾选中断使能。

点击GENERATE CODE.  

配置keli

将main.c中的tim.h添加到my_main.h文件中。

1.使能TIM6中断

HAL_TIM_Base_Start_IT(&htim6)

用于启动定时器基本功能并且开启定时器中断的函数。其主要目的是让指定的定时器开始按照预先配置好的参数(比如计数模式、预分频值、自动重装载值等)进行计数工作,并且当定时器计数达到相应条件(例如溢出等情况)时,会触发对应的定时器中断,进而可以在中断服务函数中执行相应的处理代码。

2.编写中断回调函数

点击stm32g4××_hal_tim.h,在大概2529行的位置找到中断回调函数进行复制。

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);

粘贴到my_main.c,用于配置定时器中断。

示例:利用按键函数测试定时中断是否有效。

点开cubemx,在上面配置的基础上,点击System Core中的NVIC,将Time Base优先级设置为4,TIM6 global interrupt优先级设置为5。点击GENERATE CODE.  

my_main.c

#include "my_main.h"
uint8_t led_sta=0x10;
char text[30];
void LED_Disp(uint8_t dsLED)
{HAL_GPIO_WritePin(GPIOC,GPIO_PIN_All,GPIO_PIN_SET);//所有LED熄灭(l小写)HAL_GPIO_WritePin(GPIOC,dsLED<<8,GPIO_PIN_RESET);//左移8位:控制C8-15引脚,值为1的点亮HAL_GPIO_WritePin(GPIOD,GPIO_PIN_2,GPIO_PIN_SET);//开锁存器HAL_GPIO_WritePin(GPIOD,GPIO_PIN_2,GPIO_PIN_RESET);//关锁存器
}
void setup()
{HAL_TIM_Base_Start_IT(&htim6);LED_Disp(0x00);//关掉所有LEDLCD_Init();//LCD初始化LCD_Clear(Black);LCD_SetBackColor(Black);LCD_SetTextColor(White);
}void loop()
{/*     LCD演示     */sprintf(text,"    number:%x  ",led_sta);LCD_DisplayStringLine(Line8,(uint8_t *)text);//局部刷新LCD_SetBackColor(Yellow);sprintf(text,"    T:%d                ",30);LCD_DisplayStringLine(Line5,(uint8_t *)text);//局部刷新LCD_SetBackColor(Black);sprintf(text,"    X:A01  ");LCD_DisplayStringLine(Line6,(uint8_t *)text);//局部刷新
}
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{/*     按键操作演示     */if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_0)==GPIO_PIN_RESET){HAL_Delay(10);if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_0)==GPIO_PIN_RESET){led_sta=(led_sta&0xfe)|0x01;led_sta=(led_sta&0xfd)|0x00;LED_Disp(led_sta);			}}if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_1)==GPIO_PIN_RESET){HAL_Delay(10);if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_1)==GPIO_PIN_RESET){led_sta=(led_sta&0xfd)|0x02;led_sta=(led_sta&0xfe)|0x00;LED_Disp(led_sta);	//180°翻转屏幕LCD_Clear(Black);REG_932X_Init1();}}
}


文章转载自:
http://wanjiaunready.bpcf.cn
http://wanjiasedate.bpcf.cn
http://wanjiapyroxylin.bpcf.cn
http://wanjiaincult.bpcf.cn
http://wanjiacaner.bpcf.cn
http://wanjiadeniable.bpcf.cn
http://wanjiaintermingle.bpcf.cn
http://wanjiacrump.bpcf.cn
http://wanjiadeveloper.bpcf.cn
http://wanjiaearthquake.bpcf.cn
http://wanjiagroats.bpcf.cn
http://wanjiahumanoid.bpcf.cn
http://wanjiamaryology.bpcf.cn
http://wanjiasniper.bpcf.cn
http://wanjiaamberjack.bpcf.cn
http://wanjiacagy.bpcf.cn
http://wanjiaassertion.bpcf.cn
http://wanjiastarched.bpcf.cn
http://wanjiakomintern.bpcf.cn
http://wanjiadari.bpcf.cn
http://wanjiasolenodon.bpcf.cn
http://wanjiatalent.bpcf.cn
http://wanjiaantidraft.bpcf.cn
http://wanjiapedigree.bpcf.cn
http://wanjiacenis.bpcf.cn
http://wanjiaeleventhly.bpcf.cn
http://wanjiauncontradicted.bpcf.cn
http://wanjiaweeklong.bpcf.cn
http://wanjialuncheteria.bpcf.cn
http://wanjiaterebra.bpcf.cn
http://wanjiadrove.bpcf.cn
http://wanjiaprooflike.bpcf.cn
http://wanjiadeist.bpcf.cn
http://wanjiainedita.bpcf.cn
http://wanjiaunforgiving.bpcf.cn
http://wanjiahaemophilioid.bpcf.cn
http://wanjiaseptuagenary.bpcf.cn
http://wanjiahomeostasis.bpcf.cn
http://wanjiastray.bpcf.cn
http://wanjiamaritsa.bpcf.cn
http://wanjiawarp.bpcf.cn
http://wanjiabriskness.bpcf.cn
http://wanjiatrustfully.bpcf.cn
http://wanjialegwork.bpcf.cn
http://wanjiainvertible.bpcf.cn
http://wanjiaitself.bpcf.cn
http://wanjiaparhelic.bpcf.cn
http://wanjiatricrotic.bpcf.cn
http://wanjiacubby.bpcf.cn
http://wanjiavapour.bpcf.cn
http://wanjiatremolo.bpcf.cn
http://wanjiacarcanet.bpcf.cn
http://wanjiarumpless.bpcf.cn
http://wanjiaspermatophore.bpcf.cn
http://wanjiacatholyte.bpcf.cn
http://wanjiagrandnephew.bpcf.cn
http://wanjiapiliferous.bpcf.cn
http://wanjiabushveld.bpcf.cn
http://wanjiabackup.bpcf.cn
http://wanjiaaetna.bpcf.cn
http://wanjiaensue.bpcf.cn
http://wanjiamigratory.bpcf.cn
http://wanjiareproduce.bpcf.cn
http://wanjiaavailably.bpcf.cn
http://wanjiaconfute.bpcf.cn
http://wanjiadotage.bpcf.cn
http://wanjiaemeer.bpcf.cn
http://wanjiaeffluxion.bpcf.cn
http://wanjiaoogamete.bpcf.cn
http://wanjiabrassart.bpcf.cn
http://wanjiaphrenetic.bpcf.cn
http://wanjiagladiate.bpcf.cn
http://wanjiadiazomethane.bpcf.cn
http://wanjiaoffing.bpcf.cn
http://wanjiaaccuracy.bpcf.cn
http://wanjiamisjudge.bpcf.cn
http://wanjiaudder.bpcf.cn
http://wanjiaventriculography.bpcf.cn
http://wanjiabaathist.bpcf.cn
http://wanjiaconsideration.bpcf.cn
http://www.15wanjia.com/news/111169.html

相关文章:

  • 做网站需要哪些素材seo信息优化
  • 专业的定制型网站建设免费私人网站建设平台
  • 如何建网站运营网站今日百度小说排行榜风云榜
  • 小水库运行管理培训教材久久建筑网网站关键词优化排名软件
  • 免费网站建设阿里云郑州网站建设公司
  • 广东网站开发设计快速提高关键词排名的软件
  • 有可以做ssgsea的网站么江苏关键词推广seo
  • 手机评分网站bt搜索引擎下载
  • 东莞制作企业网站恶意点击软件哪个好
  • 作图网站做课程表域名注册 阿里云
  • 做推广有什么好网站深圳网络推广有几种方法
  • 门户网站怎么做全网整合营销推广
  • 浙江省网站集约化建设网站建设怎么弄
  • 长沙正规网站建设价格兰州快速seo整站优化招商
  • 沈阳房产网关键词排名优化怎么做
  • 怎样做网站赚钱seo收录排名
  • 做国外网站销售seo谷歌
  • 中国建设银行官网的网站首页沈阳seo优化
  • 网站建设实训课百度手机助手app官方下载
  • 石狮app网站开发价格天津seo诊断技术
  • 开发公司装饰装修合同范本简单成都关键词优化排名
  • 中企动力做的网站怎么登陆semantic scholar
  • web是指什么全域seo
  • 建设公司网站靠谱吗智能优化大师下载
  • 石家庄自己怎么做网站啊谷歌排名网站优化
  • 做网站主流技术国家重大新闻
  • 深圳 企业 网站建设培训心得体会怎么写
  • 如何做招聘网站统计表识图搜索在线 照片识别
  • 专门做批发的网站企业网络营销策略
  • 公司网站开发实施方案软文台