当前位置:网站首页>STM32F103 IIC OLED program migration complete engineering code
STM32F103 IIC OLED program migration complete engineering code
2022-06-13 01:58:00 【richardgann】
This tutorial doesn't teach you the same thing OLED principle , What is? IIC Of , These concepts . Have studied SCM , We all know what is IIC, You may be a beginner , Yes IIC Conceptual understanding , But they are not proficient in application , It may also be used for the first time oled, The display effect is very good , I want to try it by hand , that , You're in the right place .
Nonsense , First, we will present the complete project documents to you , Then I will explain to you how to transplant this program .
Single chip model :stm32f103c8t6
Pay attention to WeChat public number : Guangyi electronics (dlrcclub), reply :IIC_OLED, A download link will pop up .

Before migration, let's introduce OLED How to configure the font taking software of the screen . If the configuration is incorrect , It will show a jumble .
The software we use is called PCtoLCD2002,

This software is very simple , You can get started in a minute without reading the tutorial , Let's focus on how to configure .

Refer to the configuration with red box on the picture to set , You can get the correct code .
Next, let's look at the program structure , Explain how to transplant this OLED Program .

In the program, we added IIC Drive and OLED The program , stay stm32 Medium hardware IIC It fails to work well , I use IO simulation IIC, Of course , This IIC I didn't write the driver , I can't remember IIC drive , Find one. IIC drive , I see. , Will call functions , I can transplant , So it will IIC 了 , You can't do everything yourself , Learn to stand on the shoulders of giants .

open oled.c After the file, we can see that there are so many functions , Each function is different , There is a display of Chinese characters , There are numbers displayed , There is a display string , A wide range of functions , Beginners look really cool , But this is not what I also wrote , No matter which screen it is , Whether it's LCD、OLED still TFT The screen , Manufacturers will give you drivers , It's the same old saying , As long as you can transplant , Would call , Then you can finish most of the work , To be precise , I should have finished the work quickly .
After introducing the above functions, you may not be able to migrate them , Let's talk about how to transplant , In this project, we only need to use oled and iic That's enough . in other words , We're going to transplant oled.c、oled.h、iic.c、iic.h That's all right. .

Click the red, green and white Icon on the toolbar , Selected folder , And then click AddFiles, Just add the files you need to add , So what we add is .C file , An error will be reported when compiling , We also need to add .h file .
Follow the steps in the figure , Put the corresponding file .h file
Add to it , In this way, we can see the corresponding .h The file was added to it .
In the corresponding c In the file, we add the header file , You can call the corresponding function .
As shown in the figure above , We added oled.h and bsp_i2c.h The header file , You can call OLED_ShowCHinese Function , You can display the required text in OLED The screen .

The above explains how to transplant oled and iic Program , To quickly implement the tutorial of program presentation , Search for bilibili( Guangyi is in action ) There are corresponding video content explanations , Welcome to like 、 Follow and forward .
边栏推荐
- 蓝牙模块:使用问题集锦
- Qt实现思维导图功能(二)
- rsync 传输排除目录
- Gome's ambition of "folding up" app
- Audiences with similar interests
- Topic creation and running example of ROS
- Installing pytorch geometric
- [printf function and scanf function] (learning note 5 -- standard i/o function)
- leetcode743. Network latency (medium, Dijkstra)
- [the fourth day of actual combat of stm32f401ret6 smart lock project in 10 days] voice control is realized by externally interrupted keys
猜你喜欢

Using OpenCV in go

Luzhengyao, who has entered the prefabricated vegetable track, still needs to stop being impatient

uniapp 预览功能

Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation

华为设备配置虚拟专用网FRR

万字讲清 synchronized 和 ReentrantLock 实现并发中的锁

The commercial value of Kwai is being seen by more and more brands and businesses

回顾ITIL各版本历程,找到企业运维发展的关键点

Why is "iFLYTEK Super Brain 2030 plan" more worthy of expectation than "pure" virtual human
![[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] GPIO and register](/img/eb/9bd411be74937371de0bbf3f04267e.jpg)
[the second day of actual combat of smart lock project based on stm32f401ret6 in 10 days] GPIO and register
随机推荐
如何解决通过new Date()获取时间写出数据库与当前时间相差8小时问题【亲测有效】
Ctrip reshapes new Ctrip
华为设备配置CE双归属
Detailed explanation of audience characteristics
The scientific innovation board successfully held the meeting, and the IPO of Kuangshi technology ushered in the dawn
Application and routine of C language typedef struct
谷歌的智能出价有几种?
What did Hello travel do right for 500million users in five years?
Opencv camera calibration (2): fish eye camera calibration
swiper 横向轮播 grid
Introduction to Google unit testing tools GTEST and gmoke
TensorFlow 2. X multi graphics card distributed training
Detailed explanation of deep learning parameter adjustment skills
Delphi 10.4.2 release instructions and installation methods of three patches
万字讲清 synchronized 和 ReentrantLock 实现并发中的锁
Top level configuration + cooling black technology + cool appearance, the Red Devils 6S Pro is worthy of the flagship game of the year
What is solid angle
[arithmetic, relation, logic, bit, compound assignment, self increasing, self decreasing and other] operators (learning note 4 -- C language operators)
Restrict cell input type and display format in CXGRID control
When AI meets music, iFLYTEK music leads the industry reform with technology