当前位置:网站首页>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 .
边栏推荐
- In addition to the full screen without holes under the screen, the Red Devils 7 series also has these black technologies
- Opencv camera calibration (1): internal and external parameters, distortion coefficient calibration and 3D point to 2D image projection
- [the 4th day of the 10 day smart lock project based on stm32f401ret6] what is interrupt, interrupt service function, system tick timer
- Introduction to common ROS commands
- Interruption of 51 single chip microcomputer learning notes (external interruption, timer interruption, interrupt nesting)
- 水管工遊戲
- Luzhengyao, who has entered the prefabricated vegetable track, still needs to stop being impatient
- Padavan mounts SMB sharing and compiles ffmpeg
- Establishment of microservice development environment
- js获取元素
猜你喜欢

30: Kakfa simulates JSON data generation and transmission

uniapp 预览功能

C language conditional compilation routine

matplotlib画图中文乱码

三、上传织物图片至SQL Server并提供name进行展示织物照片

Devaxpress Chinese description --tdximageslider (picture rotation control)

四、入库管理功能的完善

Magics 23.0 how to activate and use the slice preview function of the view tool page

10 days based on stm32f401ret6 smart lock project practice day 1 (environment construction and new construction)

Plumber game
随机推荐
3、 Upload fabric photos to SQL server and provide name to display fabric photos
The first cell of devaxpress CXGRID after inserting a row is in focus editing status
Delphi 10.4.2 release instructions and installation methods of three patches
Magics 23.0如何激活和使用视图工具页的切片预览功能
Matplotlib drawing Chinese garbled code
水管工遊戲
Numpy multidimensional array transpose transpose
Decoding iFLYTEK open platform 2.0 is a fertile land for developers and a source of industrial innovation
Leetcode question 20
Logging system in chromium
rsync 传输排除目录
LabVIEW large project development tools to improve quality
Server installation jupyterab and remote login configuration
传感器:SHT30温湿度传感器检测环境温湿度实验(底部附代码)
如何通过受众群体定位解决实际问题?
Learning notes 51 single chip microcomputer keyboard (non coding keyboard and coding keyboard, scanning mode of non coding keyboard, independent keyboard, matrix keyboard)
[printf function and scanf function] (learning note 5 -- standard i/o function)
华为设备配置私网IP路由FRR
Interruption of 51 single chip microcomputer learning notes (external interruption, timer interruption, interrupt nesting)
Shell command notes