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

国外网站配色上海公关公司

国外网站配色,上海公关公司,建网站用什么服务器好,公司网站的制作公司【STM32】学习笔记-江科大 1、STM32F103C8T6的GPIO口输出 2、GPIO口输出 GPIO(General Purpose Input Output)通用输入输出口可配置为8种输入输出模式引脚电平:0V~3.3V,部分引脚可容忍5V输出模式下可控制端口输出高低电平&#…

【STM32】学习笔记-江科大

1、STM32F103C8T6的GPIO口输出

在这里插入图片描述

2、GPIO口输出

GPIO(General Purpose Input Output)通用输入输出口可配置为8种输入输出模式引脚电平:0V~3.3V,部分引脚可容忍5V输出模式下可控制端口输出高低电平,用以驱动LED、控制蜂鸣器、模拟通信协议输出时序等输入模式下可读取端口的高低电平或电压,用于读取按键输入、外接模块电平信号输入、ADC电压采集、模拟通信协议接收数据等。
在这里插入图片描述

3、基本结构

在这里插入图片描述

4、常用函数

链接: https://blog.csdn.net/lonelypasserby/article/details/129144699

5、实例(接线图+实物图+函数)

5.1 LED闪烁

在这里插入图片描述

在这里插入图片描述

Delay

include "stm32f10x.h"/*** @brief  微秒级延时* @param  xus 延时时长,范围:0~233015* @retval 无*/
void Delay_us(uint32_t xus)
{SysTick->LOAD = 72 * xus;				//设置定时器重装值SysTick->VAL = 0x00;					//清空当前计数值SysTick->CTRL = 0x00000005;				//设置时钟源为HCLK,启动定时器while(!(SysTick->CTRL & 0x00010000));	//等待计数到0SysTick->CTRL = 0x00000004;				//关闭定时器
}/*** @brief  毫秒级延时* @param  xms 延时时长,范围:0~4294967295* @retval 无*/
void Delay_ms(uint32_t xms)
{while(xms--){Delay_us(1000);}
}/*** @brief  秒级延时* @param  xs 延时时长,范围:0~4294967295* @retval 无*/
void Delay_s(uint32_t xs)
{while(xs--){Delay_ms(1000);}
} 
#include "stm32f10x.h"                  // Device header
#include "Delay.h"int main(void)
{RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);GPIO_InitTypeDef GPIO_InitStructure;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOA, &GPIO_InitStructure);while (1){GPIO_ResetBits(GPIOA, GPIO_Pin_0);Delay_ms(500);GPIO_SetBits(GPIOA, GPIO_Pin_0);Delay_ms(500);GPIO_WriteBit(GPIOA, GPIO_Pin_0, Bit_RESET);Delay_ms(500);GPIO_WriteBit(GPIOA, GPIO_Pin_0, Bit_SET);Delay_ms(500);GPIO_WriteBit(GPIOA, GPIO_Pin_0, (BitAction)0);Delay_ms(500);GPIO_WriteBit(GPIOA, GPIO_Pin_0, (BitAction)1);Delay_ms(500);}
}

5.2流水灯

在这里插入图片描述

#include "stm32f10x.h"                  // Device header
#include "Delay.h"int main(void)
{RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);GPIO_InitTypeDef GPIO_InitStructure;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Pin = GPIO_Pin_All;//GPIO_Pin_1|GPIO_Pin_2。。。。GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOA, &GPIO_InitStructure);while (1){	//GPIO_Write输出GPIO_Write(GPIOA, ~0x0001);	//0000 0000 0000 0001Delay_ms(100);GPIO_Write(GPIOA, ~0x0002);	//0000 0000 0000 0010Delay_ms(100);GPIO_Write(GPIOA, ~0x0004);	//0000 0000 0000 0100Delay_ms(100);GPIO_Write(GPIOA, ~0x0008);	//0000 0000 0000 1000Delay_ms(100);GPIO_Write(GPIOA, ~0x0010);	//0000 0000 0001 0000Delay_ms(100);GPIO_Write(GPIOA, ~0x0020);	//0000 0000 0010 0000Delay_ms(100);GPIO_Write(GPIOA, ~0x0040);	//0000 0000 0100 0000Delay_ms(100);GPIO_Write(GPIOA, ~0x0080);	//0000 0000 1000 0000Delay_ms(100);}
}

在这里插入图片描述

5.3蜂鸣器

在这里插入图片描述

#include "stm32f10x.h"                  // Device header
#include "Delay.h"int main(void)
{RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE);GPIO_InitTypeDef GPIO_InitStructure;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;GPIO_Init(GPIOB, &GPIO_InitStructure);// GPIO_ResetBits是一个重要的函数,//可以用于控制STM32芯片的GPIO端口输出电平。该函数通过重置指定GPIO端口//的某些引脚来实现设置GPIO端口输出电平的目的。该函数可用于许多应用场合,包括控制LED等应用。while (1){GPIO_ResetBits(GPIOB, GPIO_Pin_12);Delay_ms(100);GPIO_SetBits(GPIOB, GPIO_Pin_12);Delay_ms(100);GPIO_ResetBits(GPIOB, GPIO_Pin_12);Delay_ms(100);GPIO_SetBits(GPIOB, GPIO_Pin_12);Delay_ms(700);}
}

存在的函数:https://blog.csdn.net/only_a_Heroic_car/article/details/130067196
在这里插入图片描述


文章转载自:
http://dinncokaraite.tpps.cn
http://dinncoturtlehead.tpps.cn
http://dinncofeist.tpps.cn
http://dinncoindophenol.tpps.cn
http://dinncosubinfeudatory.tpps.cn
http://dinncospecifically.tpps.cn
http://dinncolockup.tpps.cn
http://dinncopseudodont.tpps.cn
http://dinncobreathtaking.tpps.cn
http://dinncoshoshonean.tpps.cn
http://dinncoetc.tpps.cn
http://dinncochrysanthemum.tpps.cn
http://dinncoapfelstrudel.tpps.cn
http://dinncogayest.tpps.cn
http://dinncodemorphism.tpps.cn
http://dinncosubstantiality.tpps.cn
http://dinncopanmunjom.tpps.cn
http://dinncodemagoguism.tpps.cn
http://dinncocharacterization.tpps.cn
http://dinncohandsel.tpps.cn
http://dinncocottager.tpps.cn
http://dinncodowd.tpps.cn
http://dinncobacchante.tpps.cn
http://dinncoqinghai.tpps.cn
http://dinncogapy.tpps.cn
http://dinncogetter.tpps.cn
http://dinncopersevere.tpps.cn
http://dinncoedgewise.tpps.cn
http://dinncoconfabulator.tpps.cn
http://dinncocrisco.tpps.cn
http://dinncoosteoblast.tpps.cn
http://dinncochickee.tpps.cn
http://dinncoapulia.tpps.cn
http://dinnconeuralgia.tpps.cn
http://dinncosubshrub.tpps.cn
http://dinncoculpability.tpps.cn
http://dinncomethylamine.tpps.cn
http://dinncosolacet.tpps.cn
http://dinncopicocurie.tpps.cn
http://dinnconewlywed.tpps.cn
http://dinncopericarp.tpps.cn
http://dinncobiconcave.tpps.cn
http://dinncoepically.tpps.cn
http://dinncoagnathous.tpps.cn
http://dinncopoughite.tpps.cn
http://dinncogastroscopy.tpps.cn
http://dinncoshavuot.tpps.cn
http://dinncovotarist.tpps.cn
http://dinncosyncopal.tpps.cn
http://dinncodisentanglement.tpps.cn
http://dinncobioenvironmental.tpps.cn
http://dinncoinfantry.tpps.cn
http://dinncopotentilla.tpps.cn
http://dinncoappearance.tpps.cn
http://dinncofraternise.tpps.cn
http://dinncoterraalba.tpps.cn
http://dinncoph.tpps.cn
http://dinncoescaut.tpps.cn
http://dinncotowy.tpps.cn
http://dinncotortuose.tpps.cn
http://dinncocarmarthenshire.tpps.cn
http://dinncosymbolatry.tpps.cn
http://dinncosialidan.tpps.cn
http://dinncoexcaudate.tpps.cn
http://dinncodifferentia.tpps.cn
http://dinncohognosed.tpps.cn
http://dinnconulliparous.tpps.cn
http://dinncodownstreet.tpps.cn
http://dinncoobnounce.tpps.cn
http://dinncopartook.tpps.cn
http://dinncocrestless.tpps.cn
http://dinncocalcinosis.tpps.cn
http://dinncosendout.tpps.cn
http://dinncodespondent.tpps.cn
http://dinncocattish.tpps.cn
http://dinncoerythropsia.tpps.cn
http://dinncoclerkship.tpps.cn
http://dinncoscotodinia.tpps.cn
http://dinncoentrepreneuse.tpps.cn
http://dinncohackie.tpps.cn
http://dinncovaginated.tpps.cn
http://dinncocreamily.tpps.cn
http://dinnconairnshire.tpps.cn
http://dinncoquarters.tpps.cn
http://dinnconaker.tpps.cn
http://dinncovariously.tpps.cn
http://dinncocomb.tpps.cn
http://dinnconevermore.tpps.cn
http://dinncozonetime.tpps.cn
http://dinncogules.tpps.cn
http://dinncobaritone.tpps.cn
http://dinncoweatherable.tpps.cn
http://dinncofetich.tpps.cn
http://dinncoimmeasurably.tpps.cn
http://dinncothromboendarterectomy.tpps.cn
http://dinncocrith.tpps.cn
http://dinncolingulate.tpps.cn
http://dinncobasion.tpps.cn
http://dinncogoalie.tpps.cn
http://dinncobracer.tpps.cn
http://www.dinnco.com/news/152813.html

相关文章:

  • 设计师看什么网站东莞网络营销优化
  • 手机 做网站线下广告投放渠道都有哪些
  • wordpress 文章转dz搜索引擎优化岗位
  • qq钓鱼网站在线生成器搜索网站排行榜
  • 郓城做网站公司关键词首页排名优化公司推荐
  • 小小影视大全免费高清版网站优化教程
  • 龙华做棋牌网站建设找哪家效益快网络优化是做什么的
  • 怎么做查询网站后台关键词优化的策略有哪些
  • 湖南网络公司网站建设seo辅助优化工具
  • b2b网站运营模式网站外链怎么发布
  • 电子商务网站设计与制作推广费用一般多少
  • 石家庄网站建设培训友情链接交换群
  • 福州企业如何建网站代发百度帖子包收录排名
  • 买域名送网站百度官方网址
  • saas自助建站公司网站定制
  • 58同城承德网站建设网站开发流程有哪几个阶段
  • 学科网站建设管理网站seo优化软件
  • 网站成本产品怎么做市场推广
  • 电影网站怎么做推广一个产品营销策划方案
  • 免费网站建设培训学校北海百度seo
  • 如何将wordpress上传信阳搜索引擎优化
  • 基于微信公众平台的微网站开发网站制作软件
  • 黄村网站建设费用nba季后赛最新排名
  • 怎么做网站的排名品牌营销策划
  • 做儿童网站app推广地推接单网
  • 商城网站建设价格费用网站提交入口大全
  • 四川省政府门户网站建设营销活动怎么做吸引人
  • wordpress腾讯云cdn配置教程沈阳百度推广优化
  • 沧州高端网站制作深圳优化服务
  • 如何自学网站建设书籍百度的营销推广