当前位置:网站首页>Stm32f103c8t6 firmware library lighting
Stm32f103c8t6 firmware library lighting
2022-07-03 16:01:00 【Big golden hair】
summary : Configure lighting graphic description through firmware library
1. In the firmware library folder USER Create a folder in LED, stay LED Create text in folder ,LED.C,LED.H


2. stay keil Middle double click user The folder will c Add the file

3. stay c Add the required header file to the file , This time we need
#include "led.h"
#include "stm32f10x.h"Compile once after adding
4. open led.h, Add... To it
#include "stm32f10x.h"5. Add a path to the magic wand



7. Write led-init Function configuration GPIO Structure

It can be seen from the schematic diagram that LED Corresponding PC13, We need to configure GPIOc The clock of ,GPIOc Mounted on APB2 On , So it needs to be turned on APB2 The clock on the computer .

GPIO_InitTypeDef It includes

Pin , Speed ( You can choose any one for the time being ), The output mode ( Push pull output )
Use GPIO_Init(); Function initialization on GPIO, The first parameter is GPIOX, The second is the address of the structure variable
stay h Relevant functions are described in the document

8. stay main.c Initialization function used in

9. You need to use two functions ,GPIO_SetBit()[ Set up 1] and GPIO_RsetBit()[ Set up 0]
From the schematic diagram, you want LED bright GPIO One end should be placed 0 In order to have enough pressure difference to make LED bright
GPIO_ResetBits(GPIOC,GPIO_Pin_13);10. compile , Swipe after no error
边栏推荐
- Popular understanding of decision tree ID3
- Semi supervised learning
- 【Proteus仿真】74HC595+74LS154驱动显示16X16点阵
- pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
- CString中使用百分号
- 【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
- How are integer and floating-point types stored in memory
- win32创建窗口及按钮(轻量级)
- Download and install common programs using AUR
- Reading notes of "micro service design" (Part 2)
猜你喜欢

初试scikit-learn库

Please be prepared to lose your job at any time within 3 years?

《微服务设计》读书笔记(下)

uploads-labs靶场(附源码分析)(更新中)

工资3000,靠“视频剪辑”月入40000:会赚钱的人,从不靠拼命!

2022年Q2加密市场投融资报告:GameFi成为投资关键词
![[200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)](/img/04/460734209ec315c5c02cb3fae4bf0e.png)
[200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)

MongoDB 的安装和基本操作

From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing

【Proteus仿真】8×8LED点阵屏仿电梯数字滚动显示
随机推荐
Digital image processing -- popular understanding of corrosion and expansion
【OpenCV 例程200篇】217. 鼠标交互获取多边形区域(ROI)
The difference between calling by value and simulating calling by reference
软件逆向破解入门系列(1)—xdbg32/64的常见配置及功能窗口
Nine ways to define methods in scala- Nine ways to define a method in Scala?
Microservices - load balancing ribbon
Under VC, Unicode and ANSI are converted to each other, cstringw and std:: string are converted to each other
Tensorflow realizes verification code recognition (III)
“用Android复刻Apple产品UI”(3)—优雅的数据统计图表
“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画
App mobile terminal test [5] file writing and reading
秒杀系统3-商品列表和商品详情
深度学习之三维重建
Microservices Seata distributed transactions
Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
Vs2017 is driven by IP debugging (dual machine debugging)
Detailed pointer advanced 2
Popular understanding of decision tree ID3
Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
The wonderful use of do{}while()