当前位置:网站首页>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 .
边栏推荐
- What are cookies in Web site development?
- The live registration is hot to start | the first show of Apache dolphin scheduler meetup in 2022!
- Live broadcast preview | front line experts invite you to talk: the value of data science enabling multiple application scenarios
- Literals and type conversions of basic data types
- Record some questions about MySQL (DNS reverse resolution in Linux)
- Expand and check the specified node when loading ztree
- What is machine learning? (Fundamentals)
- 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)
- The beginning of manjaro's journey
- Yunzhisheng atlas supercomputing platform: computing acceleration practice based on fluid + alluxio (Part I)
猜你喜欢
How to play one to many in JPA?

The beginning of manjaro's journey
Attention to government and enterprise users! The worm prometei is spreading horizontally against the local area network

TypeError: __ init__ () takes 1 positional argument but 5 were given
8 minutes to understand the wal mechanism of tdengine
New generation engineers teach you how to play with alluxio + ml (Part 2)
hashlib. Md5() function to filter out duplicate system files and remove them

Solution to big noise of OBS screen recording software
Yunzhisheng atlas supercomputing platform: computing acceleration practice based on fluid + alluxio (Part I)

Bank digital transformation layout in the beginning of the year, 6 challenges faced by financial level structure and Countermeasures
随机推荐
Share several Threat Intelligence platforms
Great changes in the interaction between people and the digital world
HMS core actively explores the function based on hardware ear return, helping to reduce the overall singing delay rate of the singing bar by 60%
Uncover n core 'black magic' of Presto + alluxio
Leaflet modify popup style
Png to NII
Modifying routes without refreshing the interface
What are the differences between domestic advanced anti DDoS servers and overseas advanced anti DDoS servers?
Leetcode daily question - 27 Remove element (simple)
Several methods of obtaining function annotation text on pycharm
Usage Summary of str.format() function [not 'str****{}'.Format()]
Paddledtx v1.0 has been released, and its security and flexibility have been comprehensively improved!
DICOM to NII
Expand and check the specified node when loading ztree
Popular understanding of deviation and variance in machine learning
Understand the offline mixing technology in the industry
Section 13: simplify your code with Lombok
Why doesn't anyone read your hard-working blog? Do you really understand the skills of framing, typesetting and drawing?
Intra domain information collection for intranet penetration
Leetcode daily [2022 - 02 - 18]