当前位置:网站首页>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
边栏推荐
- First!! Is lancet hungry? Official documents
- VS2017通过IP调试驱动(双机调试)
- [list to map] collectors Tomap syntax sharing (case practice)
- nifi从入门到实战(保姆级教程)——flow
- ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
- A Fei's expectation
- 请求头不同国家和语言的表示
- Go language self-study series | golang switch statement
- Under VC, Unicode and ANSI are converted to each other, cstringw and std:: string are converted to each other
- 秒杀系统3-商品列表和商品详情
猜你喜欢

【Proteus仿真】74HC595+74LS154驱动显示16X16点阵

App移动端测试【3】ADB命令

Second kill system 3 - list of items and item details

How can technology managers quickly improve leadership?

从 flask 服务端代码自动生成客户端代码 -- flask-native-stubs 库介绍

How to thicken the brush in the graphical interface

QT use qzxing to generate QR code

Embedded development: seven reasons to avoid open source software

How are integer and floating-point types stored in memory

About text selection in web pages and counting the length of selected text
随机推荐
Function introduction of JMeter thread group
Microservice - declarative interface call openfeign
[combinatorics] combinatorial identities (recursive combinatorial identities | sum of variable terms | simple combinatorial identities and | sum of variable terms | staggered sums of combinatorial ide
Persisting in output requires continuous learning
Seckill system 3- product list and product details
C language brush questions ~leetcode and simple questions of niuke.com
【Proteus仿真】74HC595+74LS154驱动显示16X16点阵
ASEMI整流桥UMB10F参数,UMB10F规格,UMB10F封装
Detailed explanation of four modes of distributed transaction (Seata)
[系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解
Problems of CString in multithreading
Redis高可用与持久化
[combinatorics] combinatorial identity (sum of variable upper terms 1 combinatorial identity | summary of three combinatorial identity proof methods | proof of sum of variable upper terms 1 combinator
关于网页中的文本选择以及统计选中文本长度
Popular understanding of decision tree ID3
Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
Microservice sentinel flow control degradation
阿飞的期望
Microservice API gateway
Calibre LVL