当前位置:网站首页>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
边栏推荐
- Redis在Windows以及Linux系统下的安装
- Please be prepared to lose your job at any time within 3 years?
- C language brush questions ~leetcode and simple questions of niuke.com
- 子类隐藏父类的同名函数
- Unity function - unity offline document download and use
- Creation and destruction of function stack frames
- Under VC, Unicode and ANSI are converted to each other, cstringw and std:: string are converted to each other
- uploads-labs靶场(附源码分析)(更新中)
- Reading notes of "micro service design" (Part 2)
- 六月 致 -.-- -..- -
猜你喜欢
![SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]](/img/3b/7523eca5bbcdbba29d9b7f6e4791a5.jpg)
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]

Salary 3000, monthly income 40000 by "video editing": people who can make money never rely on hard work!

Digital image processing -- popular Canny edge detection

“用Android复刻Apple产品UI”(3)—优雅的数据统计图表

关于网页中的文本选择以及统计选中文本长度

Microservice - declarative interface call openfeign

How to thicken the brush in the graphical interface

Seckill system 2 redis solves the problem of distributed session

Find mapping relationship

几种常见IO模型的原理
随机推荐
分布式事务(Seata) 四大模式详解
Three dimensional reconstruction of deep learning
Large CSV split and merge
Unity功能——Unity离线文档下载及使用
Reading notes of "micro service design" (Part 2)
Vs2017 is driven by IP debugging (dual machine debugging)
Salary 3000, monthly income 40000 by "video editing": people who can make money never rely on hard work!
MongoDB 的安装和基本操作
Wechat payment -jsapi: code implementation (payment asynchronous callback, Chinese parameter solution)
How to use AAB to APK and APK to AAB of Google play apps on the shelves
六月 致 -.-- -..- -
The wonderful use of do{}while()
Location of software installation information and system services in the registry
CString中使用百分号
SDNU_ ACM_ ICPC_ 2022_ Winter_ Practice_ 4th [individual]
"Remake Apple product UI with Android" (2) -- silky Appstore card transition animation
Semi supervised learning
Popular understanding of decision tree ID3
Unity function - unity offline document download and use
Using optimistic lock and pessimistic lock in MySQL to realize distributed lock