当前位置:网站首页>OLED driver learning based on ssd1306 (I): SSD Chinese command table (handling)
OLED driver learning based on ssd1306 (I): SSD Chinese command table (handling)
2022-06-25 20:49:00 【CharX】
SSD1306 command
Command form (D/C#=0, R/W#(WR#) = 0, E(RD#=1) Except for special conditions )
- Basic commands
D/C | Hex | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | command | describe |
0 | 81 A[7:0] | 1 A7 | 0 A6 | 0 A5 | 0 A4 | 0 A3 | 0 A2 | 0 A1 | 1 A0 | Set contrast | Double byte command ,1~256 Level contrast is optional , The contrast increases with the value . ( reset value = 0x7f) |
0 | A4/A5 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | X0 | Show all on | A4h,X0 = 0 : Restore memory content display ( Default ), Output the contents of memory A5h,X0 = 1 : Turn on the display , Output ignores the contents of memory |
0 | A6/A7 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | X0 | Settings are normal / Inverse display | A6,X[0]= 0: Normal display ( Default ) RAM by 0: The display panel is off RAM by 1: The display panel is on A7 X[0]= 1: Inverse display RAM by 0: The display panel is on RAM by 1: The display panel is off |
0 | AE/AF | 1 | 0 | 0 | 0 | 1 | 1 | 1 | X0 | Set the display on / Turn off | AE:X[0]= 0: Turn off the display ( Default ) AF:X[0]= 1: Display... In normal mode |
2、 rolling Command table
D/C | Hex | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | command | describe |
0 0 0 0 0 0 0 | 26/27 A[7:0] B[2:0] C[2:0] D[2:0] E[7:0] F[7:0] | 0 0 * * * 0 1 | 0 0 * * * 0 1 | 1 0 * * * 0 1 | 0 0 * * * 0 1 | 0 0 * * * 0 1 | 1 0 B2 C2 D2 0 1 | 1 0 B1 C1 D1 0 1 | X0 0 B0 C0 D0 0 1 | Continuous horizontal scrolling setting | 26 Hours ,X[0]= 0, Scroll right horizontally 27 h,X[0]= 1, Scroll left horizontally ( Horizontal scrolling 1 Column ) [7:0]: Virtual bytes ( Set to 00 h) B(2:0): Define the start page address 0~7 PAGE0 ~ PAGE7 C(2:0): Set the frame rate of the time interval between each scrolling step 000 b - 5 frame 100 b - 3 frame 001 b - 64 frame 101 b - 4 frame 010 b - 128 frame 110 b - 25 frame 011 b - 256 frame 111 b - 2 frame D(2:0): Define the final page address 0~7 PAGE0 ~ PAGE7 D(2:0) The value of must be greater than or equal to B(2:0) E[7:0]: Virtual bytes ( Set to 00 h) F[7:0]: Virtual bytes ( Set to FFh) |
0 0 0 0 0 0 | 29/2A A[2:0] B[2:0] C[2:0] D[2:0] E[5:0] | 0 0 * * * 0 | 0 0 * * * 0 | 1 0 * * * E5 | 0 0 * * * E4 | 1 0 * * * E3 | 0 0 B2 C2 D2 E2 | X1 0 B1 C1 D1 E1 | X0 0 B0 C0 D0 E0 | Continuous vertical and horizontal scrolling Set up | 29H,X1X0 = 01 : Vertical and horizontal scrolling 2AH,X1X0 = 10 : Vertical and horizontal scrolling ( Horizontal scrolling 1 Column ) [7:0]: Virtual bytes B(2:0): Define the start page address 0~7 PAGE0 ~ PAGE7 C(2:0): Set the frame rate of the time interval between each scrolling step 000 b - 5 frame 100 b - 3 frame 001 b - 64 frame 101 b - 4 frame 010 b - 128 frame 110 b - 25 frame 011 b - 256 frame 111 b - 2 frame D(2:0): Define the final page address 0~7 PAGE0 ~ PAGE7 D(2:0) The value of must be greater than or equal to B(2:0) E[5:0]: Vertical scroll offset for example E[5:0]= 01 h Means to offset = 1 That's ok E(5:0)= 3 Frequency hopping means cancellation = 63 That's ok Please note that (1) No continuous vertical scrolling available . |
0 | 2E | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | Disable scrolling | |
0 | 2F | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 1 | Activate scrolling | |
0 0 0 | A3 A[5:0] B[6:0] | 1 * 0 | 0 * B5 | 1 A5B5 | 0 A4B4 | 0 A3B3 | 0 A2 B2 | 1A1 B1 | 1A0 B0 | Set vertical scrolling Area | A(5:0): No, . Of Row fixed area . No, . The row of the fixed region refers to GDDRAM( Reset = 0)( Immediately .0] B[6:0]: No, . On the scrolling line . This is a number of lines for vertical scrolling . The scrolling area starts at the top fixed area below the first line .( Reset = 64) Please note that (1)A[5:0]+[6:0]< = MUX ratio (2)B(6:0)< = MUX ratio (3) Vertical scroll offset (E(5:0)h / 2 ah 29 Japan )<B[6:0] (3 b) Set the display line (X5X4X3X2X1X0 Start 40 h ~ 7 frequency hopping )< B[6:0] (4) The last line of scrolling area is transferred to the first line of scrolling area . (5) Yes 64 d MUX Show (5:0)= 0,B[6:0]= 64: The entire area scrolls (5:0)= 0,B[6:0]< 64: Advanced Scroll A[5:0]+[6:0]< 64: Central area scroll A[5:0]+[6:0]= 64: Bottom area scroll |
3、 Address setting command table
D/C | Hex | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 | command | describe |
0 | 00~0F | 0 | 0 | 0 | 0 | X3 | X2 | X1 | X0 | Set the low column start address Page addressing mode | Set the low biting start address of the column Book page use X( hold ) Addressing mode data bits . After the initial display line register is reset, it is reset to 0000 b. Please note that (1) This command is only in page addressing mode |
0 | 10~1F | 0 | 0 | 0 | 1 | X3 | X2 | X1 | X0 | Set a higher column Start address Page addressing mode | Set the high biting start address of the column Book page use X( hold ) Addressing mode data bits . After the initial display line register is reset, it is reset to 0000 b. Please note that 1) This command is only in page addressing mode |
0 0 | 20 A[1:0] | 0 * | 0 * | 1 * | 0 * | 0 * | 0 * | 0 A1 | 0 A0 | Set memory addressing mode | A[1:0]= 00, water Flat addressing mode A[1:0]= 01, Vertical addressing mode A[1:0]= 10, Page addressing mode ( Reset ) A[1:0]= 11, Invalid |
0 0 0 | 21 A[6:0] B[6:0] | 0 * * | 0 A6B6 | 1 A5B5 | 0 A4B4 | 0 A3B3 | 0 A2 B2 | 0A1 B1 | 1A0 B0 | Set column address | Set column start and end addresses A[6:0]: Column start address , Range :0 - 127 ( The default value is = 0) B[6:0]: Column end address range :0 - 127 ( The default value is = 127) notes :(1) This command is only for horizontal or vertical addressing mode . |
0 0 0 | 22 A[2:0] B[2:0] | 0 * * | 0 * * | 1 * * | 0 * * | 0 * * | 0 A2 B2 | 1A1 B1 | 0A0 B0 | Set page address | Page setup start and end addresses A[2:0]: Page starting address , Range :0-7 ( The default value is = 0 ) B[2:0]: Page end address , Range :0-7 ( The default value is = 7 ) notes :(1) This command is only for horizontal or vertical addressing mode . |
0 | B0~B7 | 1 | 0 | 1 | 1 | 0 | X2 | X1 | X0 | Set page start Page address Addressing mode | Set up GDDRAM Start of page Starting address (PAGE0 ~ PAGE7) Page addressing mode , Use X[2:0]. Please note that (1) This command is only in page addressing mode |
4、 Hardware configuration table ( Panel resolution & Design related ) command
0 | 40~7F | 0 | 1 | X5 | X4 | X3 | X2 | X1 | X0 | Set display start line | Set display RAM Display start line address of 0 -> 63, Use X5X4X3X2X1X0 . The starting line address after reset is 0. |
0 | A0/A1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | X0 | Set segment remapping | A0,X[0]= 0: Column address 0 Mapping to SEG0( The default value is ) A1 X[0]= 1: Column address 127 Mapping to SEG0 |
0 0 | A8 A[5:0] | 1 * | 0 * | 1 A5 | 0 A4 | 1 A3 | 0 A2 | 0 A1 | 0 A0 | Set multiple comparison columns | MUX The ratio is set to N + 1 MUX N =A[5:0]: from 16MUX To 64MUX , reset value = 111111 b( namely 63 d、64 mux) A[5:0]: value 0 To 14 It's invalid . |
0 | C0/C8 | 1 | 1 | 0 | 0 | X3 | 0 | 0 | 0 | Set up COM Output scan direction | C0:X[3]= 0: Normal mode ( The default value is ) scanning COM0->COM(N - 1) C8:X[3]= 1: Remapping mode . scanning COM0(N - 1)->COM0 among N yes MUX Ratio value |
0 0 | D3 A[5:0] | 1 * | 1 * | 0 A5 | 1 A4 | 0 A3 | 0 A2 | 1 A1 | 1 A0 | Set display compensation | Set up COM Move vertically 0->63 The value after reset is 0. |
0 0 | DA A[5:4] | 1 * | 1 * | 0 A5 | 1 A4 | 0 0 | 0 0 | 1 0 | 1 0 | Set up COM foot | A[4]= 0, continuity COM Foot configuration A[4]= 1,( Default ), Can choose COM Foot configuration A[5]= 0,( Default ), Ban COM Left / Right remapping A[5]= 1,COM Left / Right remapping |
5、 Time and drive scheme settings Order table
0 0 | D5 A[7:0] | 1 A7 | 1 A6 | 0 A5 | 1 A4 | 0 A3 | 1 A2 | 0 A1 | 1 A0 | Set the display clock Sub ratio / Oscillator frequency | A[3:0]: Set up DCLK Frequency division factor of : Frequency division ratio =A[3:0]+ 1, Reset to 0( Frequency division ratio = 1); A[7:4]: Set the crystal oscillator frequency ,FOSC The frequency varies with A[7:4] To increase by , vice versa . Reset to 8, Range :0 ~ 15; When the set value increases, the frequency increases . |
0 0 | D9 A[7:0] | 1 A7 | 1 A6 | 0 A5 | 1 A4 | 1 A3 | 0 A2 | 0 A1 | 1 A0 | Set up Pre-charge interval | A[3:0]:1 To 15 DCLK The interval of , write in 0 It's invalid ( reset value = 2); A[7:4]:2 To 15 DCLK The interval of ; write in 0 It's invalid ( reset value = 2) |
0 0 | DB A[6:4] | 1 0 | 1 A6 | 0 A5 | 1 A4 | 0 0 | 0 0 | 1 0 | 1 0 | VCOMH Voltage setting | A[6:4] V COMH Set up 00 0.65 x VCC 20 0.77 x VCC( After reset ) 30 0.83 x VCC |
0 | E3 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | NOP | There is no operation command |
6、 Advanced graphics command table
0 0 | 23 A[6:0] | 0 * | 0 * | 1 A5 | 0 A4 | 0 A3 | 0 A2 | 1 A1 | 1 A0 | Set fade out , Flashing | A[5:4]= 00 Ban Fade out / Flash mode ( Reset ) A[5:4]= 10 Enable fade mode . Once fade mode is enabled , The contrast diminishes For all pixels . Fade mode is disabled when outputting memory contents . A[5:4]= 11 b Enable flashing mode . Once flashing mode is enabled , Contrast reduction step by step for all pixels , It increases gradually compared with the control . The process goes round and round , Until flashing mode is disabled . A[3:0]: Set the time interval for each fading step Please note that (1) Please refer to 10.3.1 Section details . A[3:0] Time interval for each fading step 0000 b 8 frame 0001 b 16 frame 0010 b 24 frame : 1111 b 128 frame |
0 0 | D6 A[0] | 1 0 | 1 0 | 0 0 | 1 0 | 0 0 | 1 0 | 1 0 | 0 A0 | Set magnification | A[0]= 0 Disable the magnifying mode type ( Reset ) A[0]= 1 b Make the zoom in mode Please note that (1) Must be replaced in COM Panel configuration of pins ( Command [4]= 1) (2) Please refer to 10.3.2 Section details . |
7、 Charge pump command table
0 0 | 8D A[7:0] | 1 * | 0 * | 0 0 | 0 1 | 1 0 | 1 A2 | 0 0 | 1 0 | Charge pump Set up | A[2]= 0, Disable charge pump ( Reset ) A[2]= 1, Enable charge pump on display Please note that : The charge pump must be enabled before the following command sequence : 0x8d; Charge pump settings 0x14, Enable charge pump 0xAF; Turn on the display |
notes : Due to limited time , A lot of machinetranslation is just modification , Please refer to English by yourself .
边栏推荐
- [deep learning series] - visual interpretation of neural network
- Is it safe for qiniu school to open an account in 2022?
- [machine learning] machine learning from zero to mastery -- teaching you how to use decision tree to predict contact lens types
- CiteSpace download installation tutorial
- Why doesn't anyone read your hard-working blog? Do you really understand the skills of framing, typesetting and drawing?
- [opencv] opencv from introduction to mastery -- detailed explanation of input and output XML and yaml files
- How to play one to many in JPA?
- Install JDK, MySQL and nexus under Linux (tar package installation)
- Online yaml to XML tool
- Exploration of advanced document editor design in online Era
猜你喜欢
Understand the offline mixing technology in the industry
Cloud development practice of the small program for brushing questions in the postgraduate entrance examination - page design and production (home page of the question bank, ranking page, my)
Cloud native 04: use envoy + open policy agent as the pre agent
Day 28/100 CI CD basic introductory concepts
Uncover n core 'black magic' of Presto + alluxio
Boomfilter learning
2022 "gold, silver and four" is a must for job hopping. You must know 100 questions in 2022 intermediate and advanced Android interview to realize your big factory dream

Teach you how to create and publish a packaged NPM component

Splunk series: Splunk installation and deployment (I)

Node installation method you don't know
随机推荐
"Space guard soldier" based on propeller -- geosynchronous geostationary orbit space target detection system
Uncover n core 'black magic' of Presto + alluxio
Delete the page specified in PDF and merge pdf
Introduction to the basics of kotlin language: lambda expression
This is a simple and cool way to make large screen chart linkage. Smartbi will teach you
Literals and type conversions of basic data types
The live registration is hot to start | the first show of Apache dolphin scheduler meetup in 2022!
2022年启牛学堂证券开户安全嘛?
How can the intelligent transformation path of manufacturing enterprises be broken due to talent shortage and high cost?
What is an app circle of friends advertisement
[phase 23] phased summary of spring recruitment practice (Alibaba cloud has OC)
very good
One picture to achieve the selected effect
Installing mysql8 under centos8
5 minutes to learn how to install MySQL
Desktop network error display red ×, Component failed to start
Cvpr2020 | the latest cvpr2020 papers are the first to see, with all download links attached!
Yunzhisheng atlas supercomputing platform: computing acceleration practice based on fluid + alluxio (Part 2)
Server pressure troubleshooting top
How does pycharm create multiple console windows for debugging in different environments?