Domestic OLED key matrix control system based on GD32 and its operation method
The GD32-based OLED button matrix control system solves the problem that traditional button matrix devices cannot achieve universal design and function expansion. It uses OLED graphic display and photometric sensor to automatically adjust the brightness to achieve efficient visual display and low power consumption, meeting the needs of The needs of modern human-computer interaction equipment.
Patent Information
- Application Number
- CN202111434079.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-11-29
AI Technical Summary
The traditional key matrix device cannot achieve universal design and expansion of key functions, and the LED backlight illumination is uneven and the film display effect is poor. It cannot meet the needs of modern human-computer interaction equipment for visualization, graphical display and high efficiency.
Adopting a domestic OLED button matrix control system based on GD32, the OLED graphic display technology realizes the programmability of button prompt information and the configurability of function identification. It combines with the photometric sensor to automatically adjust the brightness and supports the expansion of the number of buttons and function settings, including automatic Brightness adjustment, manual brightness adjustment, sleep state and key action recording.
It realizes the visualization and graphical display of the button matrix, automatically adjusts the brightness to suit human eye comfort, reduces user software development workload, reduces power consumption, extends the life of the buttons, and supports remote management and button health prediction.
Smart Images

Figure CN114168000B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information display control, and specifically is a domestically produced OLED key matrix control system based on GD32 and an operation method thereof. Background Art
[0002] With the continuous upgrading of control equipment and the development of human-computer interaction technology, not only the performance requirements of control equipment are getting higher and higher, but also the requirements for visualization and graphical display of control equipment and the friendliness of human-computer interface are becoming more and more urgent, and higher requirements are put forward for the power consumption of control equipment and the reduction of light pollution. In the application of integrated large-screen displays such as in-vehicle, ship-borne, and airborne, a large number of buttons are needed around to assist in the input and output of control information, so as to realize the interaction of human-computer information more conveniently, intuitively, and quickly.
[0003] Traditional key matrix devices or systems mostly use keys from Swiss EAO and domestic 851 factory. The key labels are printed on film and the LED backlight is used to realize the luminous display of the key surface label characters. However, this method cannot achieve universal design of keys and expansion of the number of key functions. In addition, LED lights are used as backlight sources, which results in uneven lighting and poor film display effects. In addition, most of the current methods for changing key function labels are to redesign the film for replacement, but this is not suitable for changing key labels on site, which affects efficiency. If the number of keys cannot meet the design requirements, the key matrix can only be redesigned, which has poor scalability and cannot further meet the hardware universal design. Summary of the invention
[0004] The present invention provides a domestically produced OLED key matrix control system based on GD32 and an operation method thereof, which applies OLED graphic display technology to display keys, realizes programmable key prompt information, configurable key function identification and display content, and the number of keys can be expanded by setting a page turning function, fully meeting the user's visual and graphical display needs.
[0005] The technical solution adopted by the present invention is:
[0006] A domestically produced OLED key matrix control system based on GD32, wherein the control system is connected to the host computer system through a UDP network, and the control system comprises an OLED key matrix control board, an OLED key matrix device, a debugging device, a controlled device, a photometric sensor, an indicator light and a dimming key. The OLED key matrix control board is connected to the OLED key matrix device through an SPI bus; the OLED key matrix control board is connected to the controlled device and the debugging device respectively; the photometric sensor is connected to the OLED key matrix control board through an I2C bus; the indicator light and the dimming key are both connected to the OLED key matrix control board through a GPIO interface.
[0007] Furthermore, the OLED button matrix device includes a plurality of OLED buttons.
[0008] Furthermore, the host computer system is provided with an OLED test module, an OLED setting module and an OLED status display module.
[0009] Furthermore, the OLED key matrix control board and the controlled device are connected via a network or serial port communication; the OLED key matrix control board and the debugging device are connected via a serial port or USB communication.
[0010] An operating method of a domestic OLED key matrix control system based on GD32 includes the following steps:
[0011] S1. The OLED key matrix control system is powered on, the device is initialized, the OLED key matrix control system performs a self-check and sends the key matrix configuration file to the host computer system;
[0012] S2, the OLED key matrix control system parses the key configuration text, sets the key attributes according to the parsed value, and the key enters the working state;
[0013] S3, judging whether the key matrix is in automatic brightness adjustment mode: by default, it is set to automatic brightness adjustment mode; if it is set to manual brightness adjustment, the key matrix enters manual brightness adjustment mode;
[0014] The brightness adjustment of the key matrix specifically includes the following steps:
[0015] 1) The OLED screens on several OLED buttons are connected to the OLED button matrix control board via the SPI interface;
[0016] 2) The key control panel is connected to the light sensor;
[0017] 3) When the OLED key matrix control board detects that the automatic adjustment button is pressed, it reads the light sensor to adjust the brightness of the OLED screen;
[0018] 4) When the OLED key matrix control board detects that the brightness increases or decreases, it adjusts the brightness of the OLED screen;
[0019] S4, obtain the command code sent by the host system to the OLED key matrix control system, and determine whether the key matrix device is in the setting mode: if it is in the setting mode, the key matrix control system waits to receive the setting command sent by the host system, and after receiving the setting command, the key matrix control system sets the key and modifies the key matrix configuration file; if it is in the working mode, the key enters the working state;
[0020] S5, after the OLED key matrix enters the working state, it waits for a key to be pressed: if no key is pressed within the sleep time set by the key matrix, the key matrix enters the sleep state; if a key is pressed, the key matrix responds to the corresponding key action according to the key attribute and records the key action.
[0021] Furthermore, the step S2 specifically includes the following operating steps: 1) the OLED key matrix customizes a key attribute text format, including the text content displayed on the key, font size, background color, whether the key is a binary key, and whether it is a menu key; 2) the key matrix control board parses the custom format key attribute text, and sets the functional attributes of the key with the parsed value; the functional attributes include the key text, picture, background color, function and multi-level menu.
[0022] Furthermore, the button matrix in step S4 is in setting mode and specifically includes the following operation steps: 1) the host computer system defines the button matrix and generates a button matrix configuration text in a custom format; 2) the host computer system sends the button matrix configuration text to the OLED button matrix control board through the network port or serial port; 3) the OLED button control board defines the button logic according to the sent button matrix configuration file.
[0023] Furthermore, the key actions in step S5 include key sleep wakeup, key cloning and key interlocking;
[0024] The key sleep wake-up operation specifically includes the following steps:
[0025] 1) The OLED button control board detects the button status. If the button is not pressed for several seconds, the button turns off the OLED button to prevent the OLED button from burning in.
[0026] 2) Wake up by pressing any combination of two OLED buttons or a user-specified OLED button;
[0027] The key cloning specifically includes the following steps:
[0028] 1) The OLED key matrix control system determines whether key A is pressed first and key B is pressed later, and determines whether the time interval between the sequential pressing of keys A and B exceeds 3 seconds. If it exceeds 3 seconds, it is determined that key A needs to be cloned with key B;
[0029] 2) When button B clones button A, the OLED button matrix control system will copy the text content of button A to button B.
[0030] Furthermore, the recording of the key action in step S5 specifically includes the following steps: 1) mounting a storage device on the OLED key matrix control board; 2) recording the pressing information when the key is pressed; 3) storing the pressing information on the onboard storage device.
[0031] The beneficial effects of the present invention are: 1) the brightness adjustment mode of the key matrix can automatically adjust the brightness so that the light intensity of its keys meets the optimal comfort of the human eye; 2) the user does not need to develop the embedded underlying software, and only needs to modify the script files related to the key attributes to modify the functions such as the display and page logic of the keys, thereby greatly reducing the workload of the user's software development, and having the function of remote management; 3) the keys are set with a sleep state to reduce the power consumption of the key matrix device and extend the life of the keys, and the awakening state of the key setting uses any combination of keys to prevent the keys from being operated by mistake; 4) the key actions are recorded on the one hand for backtracking, and on the other hand for predicting the health of the keys. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a schematic diagram of the principle of a domestic OLED key matrix control system based on GD32 of the present invention;
[0033] Figure 2 It is a structural schematic diagram of a domestic OLED key matrix control system based on GD32 of the present invention;
[0034] Figure 3 It is a flow chart of an operation method of a domestic OLED key matrix control system based on GD32 of the present invention;
[0035] Figure 4 It is a rendering of an operating method of a domestically produced OLED key matrix control system based on GD32 according to the present invention.
[0036] In the figure: 1. OLED button matrix control board; 2. OLED button matrix device; 3. Debugging equipment; 4. Controlled equipment; 5. Light sensor; 6. Indicator light; 7. Dimming button; 8. Host computer system. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0038] It should be noted that in the description of the present invention, it should be noted that the orientation or position relationship indicated by the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0039] Example 1
[0040] like Figure 1 and Figure 2 As shown, a domestic OLED key matrix control system based on GD32 is connected to the host computer system 8 through a UDP network. The host computer system 8 is responsible for defining and testing the key matrix entity. It is developed using the QT development environment and runs using the Kirin operating system. The host computer system 8 is provided with an OLED test module, an OLED setting module, and an OLED status display module. The key matrix control system is responsible for receiving the key attribute definition command sent by the host computer system 8 and responding to the key definition command. Once the key matrix is defined, it can be displayed and controlled according to the defined characters. It runs using the SightOS operating system.
[0041] The control system includes an OLED button matrix control board 1, an OLED button matrix device 2, a debugging device 3, a controlled device 4, a light sensor 5, an indicator light 6 and a dimming button 7. The OLED button matrix control board 1 is connected to the OLED button matrix device 2 via an SPI bus, and the OLED button matrix device 2 includes a plurality of OLED buttons; the OLED button matrix control board 1 is network-connected to the controlled device 4, and the OLED button matrix control board 1 is serially connected to the debugging device 3; the light sensor 5 is connected to the OLED button matrix control board 1 via an I2C bus; the indicator light 6 and the dimming button 7 are both connected to the OLED button matrix control board 1 via a GPIO interface.
[0042] As a further feature of this embodiment, the OLED key matrix control board 1 and the controlled device 4 are connected via a serial communication; the OLED key matrix control board 1 and the debugging device 3 are connected via a USB communication.
[0043] Example 2
[0044] like Figure 3 As shown, an operation method of a domestic OLED key matrix control system based on GD32 includes the following steps:
[0045] S1, the OLED key matrix control system is powered on, the device is initialized, the OLED key matrix control system performs a self-check and sends the key matrix configuration file to the host computer system 8;
[0046] S2, the OLED key matrix control system parses the key configuration text, sets the key attributes according to the parsed value, and the key enters the working state;
[0047] The specific operation steps include: 1) The OLED button matrix customizes a button attribute text format, including the text content displayed on the button, font size, background color, whether the button is a binary button, and whether it is a menu key; 2) The button matrix control panel parses the custom format button attribute text, and sets the function attributes of the button with the parsed value; the function attributes include the button's text, picture, background color, function, and multi-level menu.
[0048] S3, judging whether the key matrix is in automatic brightness adjustment mode: by default, it is set to automatic brightness adjustment mode; if it is set to manual brightness adjustment, the key matrix enters manual brightness adjustment mode;
[0049] The brightness adjustment of the key matrix specifically includes the following steps:
[0050] 1) The OLED screens on the several OLED buttons are connected to the OLED button matrix control board 1 via the SPI interface;
[0051] 2) The key control panel is connected to the light sensor 5;
[0052] 3) When the OLED key matrix control board 1 detects that the automatic adjustment button is pressed, it reads the light sensor 5 to adjust the brightness of the OLED screen;
[0053] 4) When the OLED key matrix control panel 1 detects that the brightness increases or decreases, the brightness of the OLED screen is adjusted;
[0054] S4, obtaining the command code sent by the host computer system 8 to the OLED key matrix control system, and determining whether the key matrix device is in the setting mode: if it is in the setting mode, the key matrix control system waits to receive the setting command sent by the host computer system 8, and after receiving the setting command, the key matrix control system sets the key and modifies the key matrix configuration file; if it is in the working mode, the key enters the working state;
[0055] The key matrix setting mode specifically includes the following operating steps: 1) The host computer system 8 defines the key matrix and generates a key matrix configuration text in a custom format; 2) The host computer system 8 sends the key matrix configuration text to the OLED key matrix control board 1 through the network port or serial port; 3) The OLED key control board defines the key logic according to the sent key matrix configuration file.
[0056] S5, after the OLED key matrix enters the working state, it waits for a key to be pressed: if no key is pressed within the sleep time set by the key matrix, the key matrix enters the sleep state; if a key is pressed, the key matrix responds to the corresponding key action according to the key attribute and records the key action.
[0057] The key actions include key sleep wake-up, key cloning and key interlocking. The key sleep wake-up specifically includes the following steps:
[0058] 1) The OLED button control board detects the button status. If the button is not pressed for several seconds, the button turns off the OLED button to prevent the OLED button from burning in.
[0059] 2) Wake up by pressing any combination of two OLED buttons or a user-specified OLED button;
[0060] The key cloning specifically includes the following steps:
[0061] 1) The OLED key matrix control system determines whether key A is pressed first and key B is pressed later, and determines whether the time interval between the sequential pressing of keys A and B exceeds 3 seconds. If it exceeds 3 seconds, it is determined that key A needs to be cloned with key B;
[0062] 2) When button B clones button A, the OLED button matrix control system will copy the text content of button A to button B.
[0063] The recording of the key action specifically includes the following steps:
[0064] 1) Mount the storage device on the OLED key matrix control board 1;
[0065] 2) When a key is pressed, record the pressing information;
[0066] 3) Store the pressing information in the onboard storage device.
[0067] The working principle of the present invention is as follows: after the OLED key matrix is powered on, it performs a self-check and starts brightness adjustment; the OLED key matrix parses the key configuration text and sets key attributes such as characters, colors, functions, etc. according to the parsed values; by default, the OLED key matrix is in working mode. If the host computer system 8 sets the OLED keys to the setting mode, the OLED key matrix control system waits for the host computer system 8 to set the key matrix; when the key matrix is in working mode, the key matrix detects whether a key is pressed. If no key is pressed and the key sleep time is reached, the key matrix enters sleep mode. If a key is pressed, there are three working states, the first being: if the key is a combination key pressed and the current key matrix is in sleep mode, the key matrix is awakened; if the key operation is a clone operation, the key matrix performs a clone operation; other states such as the key matrix sending the key value and recording the key state are normal working states of the keys.
[0068] like Figure 4 As shown in the figure, it describes the effect diagram of the operation method of the OLED key matrix control system based on GD32. Applying OLED screen to keys can fully meet the user's visual and graphical display needs; applying OLED graphic display technology to display keys can realize programmable key prompt information, configurable key function identification and display content, and the number of keys can be expanded by setting the page turning function, which further saves the human-computer interaction space, simplifies the human-computer interaction equipment, and improves the human-computer interaction experience.
[0069] The OLED display screen in the present invention has the characteristics of wide viewing angle, high brightness, self-luminescence, fast response speed, high definition, low power consumption, excellent shock resistance, ultra-lightness, ultra-thinness, etc., and has a very wide range of applications in handheld terminals and embedded devices.
[0070] The OLED display screen in the present invention has the characteristics of wide viewing angle, high brightness, self-luminescence, fast response speed, high definition, low power consumption, excellent shock resistance, ultra-lightness, ultra-thinness, etc., and has a very wide range of applications in handheld terminals and embedded devices.
[0071] The embodiments described above are merely descriptions of preferred implementation modes of the present invention and are not intended to limit the scope of the present invention. Without departing from the principles and essence of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the scope of protection determined by the claims of the present invention.
Claims
1. A domestically produced OLED key matrix control system based on GD32, wherein the control system is connected to a host computer system (8) via a UDP network, and is characterized in that: The control system comprises an OLED key matrix control board (1), an OLED key matrix device (2), a debugging device (3), a controlled device (4), a light sensor (5), an indicator light (6) and a dimming key (7); the OLED key matrix control board (1) is connected to the OLED key matrix device (2) via an SPI bus; the OLED key matrix control board (1) is respectively connected to the controlled device (4) and the debugging device (3) in communication; the light sensor (5) is connected to the OLED key matrix control board (1) via an I2C bus; the indicator light (6) and the dimming key (7) are both connected to the OLED key matrix control board (1) via a GPIO interface; The operating method of the control system comprises the following steps: S1, the OLED key matrix control system is powered on, the device is initialized, the OLED key matrix control system performs a self-check and sends the key matrix configuration file to the host computer system (8); S2, the OLED key matrix control system parses the key configuration text, sets the key attributes according to the parsed value, and the key enters the working state; S3, judging whether the key matrix is in automatic brightness adjustment mode: by default, it is set to automatic brightness adjustment mode; if it is set to manual brightness adjustment, the key matrix enters manual brightness adjustment mode; The brightness adjustment of the key matrix specifically includes the following steps: 1) The OLED screens on the plurality of OLED buttons are connected to the OLED button matrix control board (1) via the SPI interface; 2) The key control panel is connected to the light sensor (5); 3) When the OLED key matrix control panel (1) detects that the automatic adjustment button is pressed, the light sensor (5) is read to adjust the brightness of the OLED screen; 4) When the OLED key matrix control panel (1) detects that the brightness increases or decreases, the brightness of the OLED screen is adjusted; S4, obtaining the command code sent by the host computer system (8) to the OLED key matrix control system, and determining whether the key matrix device is in the setting mode: if it is in the setting mode, the key matrix control system waits to receive the setting command sent by the host computer system (8), and after receiving the setting command, the key matrix control system sets the key and modifies the key matrix configuration file; if it is in the working mode, the key enters the working state; S5, after the OLED key matrix enters the working state, it waits for a key to be pressed: if no key is pressed within the sleep time set by the key matrix, the key matrix enters the sleep state; if a key is pressed, the key matrix responds to the corresponding key action according to the key attribute and records the key action.
2. According to claim 1, a domestically produced OLED key matrix control system based on GD32 is characterized in that: The OLED key matrix device (2) comprises a plurality of OLED keys.
3. According to the GD32-based domestic OLED key matrix control system of claim 1, it is characterized in that: The host computer system (8) is provided with an OLED test module, an OLED setting module and an OLED status display module.
4. According to the GD32-based domestic OLED key matrix control system of claim 1, it is characterized in that: The OLED key matrix control panel (1) and the controlled device (4) are connected via a network or serial port communication; the OLED key matrix control panel (1) and the debugging device (3) are connected via a serial port or USB communication.
5. According to the GD32-based domestic OLED key matrix control system of claim 1, it is characterized in that: The step S2 specifically includes the following steps: 1) The OLED key matrix customizes a key attribute text format, including the text content displayed on the key, font size, background color, whether the key is a binary key, and whether it is a menu key; 2) The key matrix control panel parses the custom format key attribute text and sets the key function attributes with the parsed value; the function attributes include the key text, picture, background color, function and multi-level menu.
6. The domestically produced OLED key matrix control system based on GD32 according to claim 1, characterized in that: The key matrix in step S4 is in a setting mode and specifically includes the following operation steps: 1) The host computer system (8) defines the key matrix and generates a key matrix configuration text in a custom format; 2) The host computer system (8) sends the key matrix configuration text to the OLED key matrix control board (1) through the network port or the serial port; 3) The OLED button control board defines the button logic according to the button matrix configuration file sent.
7. The domestically produced OLED key matrix control system based on GD32 according to claim 1, characterized in that: The key actions in step S5 include key sleep wake-up, key cloning and key interlocking; The key sleep wake-up operation specifically includes the following steps: 1) The OLED button control board detects the button status. If the button is not pressed for several seconds, the button turns off the OLED button to prevent the OLED button from burning in. 2) Wake up by pressing any combination of two OLED buttons or a user-specified OLED button; The key cloning specifically includes the following steps: 1) The OLED key matrix control system determines whether key A is pressed first and key B is pressed later, and determines whether the time interval between the sequential pressing of keys A and B exceeds 3 seconds. If it exceeds 3 seconds, it is determined that key A needs to be cloned with key B; 2) When button B clones button A, the OLED button matrix control system will copy the text content of button A to button B.
8. The domestically produced OLED key matrix control system based on GD32 according to claim 1, characterized in that: The step S5 of recording the key action specifically includes the following steps: 1) Mount the storage device on the OLED key matrix control board (1); 2) When a key is pressed, record the pressing information; 3) Store the pressing information in the onboard storage device.
