当前位置:网站首页>Using STM32 DMA to drive 4-wire SPI interface OLED high-speed display
Using STM32 DMA to drive 4-wire SPI interface OLED high-speed display
2022-06-13 00:17:00 【csaaa2005】
The solution to this problem comes from a common OLED display , It uses SSD13XX Serial interface , Can pass 8080,8086,I2C,3/4 wire SPI Transmit display .
Developing SPI Found during the display ,3 Linear SPI,DC Line uses data frame transmission , Then data transmission becomes 9 position , If you use 4 Linear SPI (DC,CS,MOSI,CLK( among CS Omission )) have access to 8 Bit data , But need D/C The level of the line determines the command or data to be transmitted .
In most of the routines provided by the manufacturer , Is to use IO To control DC Line , With the efforts of individuals , Use STM32F0 Series of chips , Use 9 Bit DMA Data transmission succeeded . But for STM32 Other series of chips , Only support 8 Bit or 16 Bit SPI.
After some research efforts , Found something to use DMA +8 position SPI A reliable method of transmitting data .
Implementation process :
1. Initialize hardware SPI
2. Use SPI Yes OLED Do initialization work , And set specific OLED Row and column parameters
3. initialization DMA->SP
That's all . The core here is the 2 Step , Because the initialization process needs to be controlled DC The line level is CMD state , So you need to operate the corresponding IO mouth .
During initialization, you need to set OLED Working in row and column mode ( Address auto increment ), Instead of the page patterns shown in those examples ( Because page mode needs to be set frequently CMD Page command ).
After setting up DC The line can be kept in DATA On the level . And open DMA transmission , In this way, a memory area can be used to OLED The memory area of .
I tested , stay F401 Upper use 72M At the kernel frequency of ,SPI Of CLK At least... Can be achieved 12M, Is much higher than F0 Series of 4M about .( The simulations used by those routines SPI Can achieve 100K It's good , It also takes up resources )
边栏推荐
- 中科大USTC:Minrui Wang | 基于Transformer的多智能体强化学习的配电网稳压
- 【Matlab】矩阵变换与矩阵求值
- Can branches sign labor contracts with employees
- TypeError: wave.ensureState is not a function
- Is the newly graduated college student taking BEC or PMP? PM who wants to transfer to another job in the future
- 机加工行业MES系统模具行业MES系统CNCl中工行业MES系统MES扫码报工MES数据采集
- [LeetCode]26. Removes duplicates from a sorted array thirty-three
- 2022年3月11日记:王老师的春天,奇异的模板模式
- PMP test difficulty and pass rate
- Masa auth - overall design from the user's perspective
猜你喜欢
MySQL index
中科大USTC:Minrui Wang | 基于Transformer的多智能体强化学习的配电网稳压
How to pass the PMP review?
OSM map local publishing - how to generate vector maps of provinces and cities
[vscode]todo tree a to-do plug-in
PMP renewal | PDU specific operation diagram
ik分词器的安装
Basics of network security (1)
【Matlab】矩阵
Learn to divide subnets in an article
随机推荐
PLC也能制作小游戏----Codesys编写猜数字小游戏
2022施工员-设备方向-通用基础(施工员)操作证考试题及模拟考试
21 Chundong University blasting safety online peacetime operation 123 [standard answer]
Real time preview of PHP in browser by vscade
[LeetCode]7. Integer inversion thirty-nine
Do you really use the buffer buffer in PostGIS?
Do you have to read for PMP?
What are the levels of safety accidents
Memory address mapping of u-boot
[LeetCode]20. Valid parentheses thirty-six
OSM map local publishing - how to generate vector maps of provinces and cities
How to quickly query the mobile phone number home and operator
How to control the display and hiding of layergroup through transparency in leaflet
6.824 Lab 3B: Fault-tolerant Key/Value Service
【Matlab】矩阵操作
【Matlab】基础运算
June 13, 2022 Daily: Turing prize winner: what should we pay attention to if we want to succeed in our academic career?
How to pass the PMP review?
Is the revised PMP worth testing?
Browser cache execution process