CN-122024656-A - Dual-bus self-switching display interface and noninductive backlight adjusting method and system
Abstract
The invention discloses a dual-bus self-switching display interface and a non-inductive backlight adjusting method and system, which integrate the whole methods of dual-bus MIPI DSI and LVDS automatic identification, IOVDD level self-adaptive configuration, level self-switching matching and non-inductive backlight adjustment based on image acquisition, realize the plug and play and automatic compatibility of the display interface, adapt to display modules with different power supply levels and communication protocols without manual intervention, ensure the electrical compatibility of signals such as reset, I2C, interrupt and the like under different IOVDD through a level self-switching circuit, improve the robustness of the system, utilize a camera image to analyze the ambient brightness, realize the real non-inductive backlight adjustment, avoid the problem that the traditional photoresistor is easy to be blocked or aged, reduce the hardware cost and BOM complexity through the whole scheme, and improve the user experience and the product universality.
Inventors
- Cao Hengbo
- YANG YUAN
- WU PENGLIANG
- PAN KE
- Ye Daixing
Assignees
- 浙江利尔达物联网技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260129
Claims (9)
- 1. The double-bus self-switching display interface and the noninductive backlight adjusting method are characterized by comprising the following steps: S1, system power-on initialization, namely configuring general purpose input/output (GPIO) of a core board into a high-resistance state input mode, closing an internal pull-up/pull-down resistor, and initializing an MIPI DSI controller and an LVDS physical layer PHY into a high-resistance state; S2, controlling at least three GPIO pins to sequentially output different level combinations so as to drive an adjustable low dropout linear regulator ADJ LDO to poll and output a plurality of preset IOVDD level gears; step S3, under each IOVDD level gear, attempting to read the device address response and the register ID of the external display module through the I2C bus, locking the current IOVDD level if the effective response is successfully obtained, and then, carrying out display bus type identification based on the locked IOVDD level; Step S4, utilizing IOVDD level output by the ADJ LDO, automatically matching logic levels of a reset signal RST, an I2C signal and a touch interrupt signal INT output by a core board to IOVDD level required by an external display module through a MOS tube level self-switching circuit; Step S5, after the display module works normally, the camera module is started periodically, a current environment image is collected through the MIPI CSI interface, and brightness analysis is carried out on the collected image to obtain an environment brightness value; and S6, comparing the ambient brightness value M with a preset target brightness threshold K, and dynamically adjusting the duty ratio of the backlight PWM signal by combining a hysteresis zone mechanism.
- 2. The dual bus self-switching display interface and the noninductive backlight adjustment method according to claim 1, wherein the step S2 is implemented by: The method comprises the steps of A1, constructing a circuit, selecting an adjustable LDO chip, connecting a fixed resistor R1 between an OUT pin and an ADJ pin to construct a feedback network, respectively connecting three GPIOs of SET1, SET2 and SET3 to the ADJ pin through current limiting resistors, and connecting the pull-down resistors to the ground; step A2, initializing a system, namely initializing SET1, SET2 and SET3 to have push-pull output which is high in parallel, establishing a truth table in a program, and mapping the combination of GPIOs in a Hi-Z or Low state to four-gear IOVDD output voltage; And step A3, executing polling and level switching, sequentially polling level gears according to the order of increasing the output voltage of four gears IOVDD by the program, setting the target GPIO to be low, setting the other GPIOs to be high to configure the current voltage, delaying to initiate I2C detection after the LDO is stabilized, locking the gears and exiting the cycle if the communication is successful, and otherwise, recovering the GPIO state and continuing the polling of the next gear.
- 3. The dual bus self-switching display interface and the noninductive backlight adjustment method according to claim 1, wherein the step S3 is implemented by: Initializing an I2C controller, automatically matching the electrical attribute of the SCL/SDA pin of the I2C master controller by means of a MOS tube level self-switching circuit under the configured IOVDD level, initializing an I2C bus into a standard mode or a quick mode, and starting a seven-bit address addressing and response mechanism; Step B2, executing address scanning of the I2C equipment, sequentially broadcasting preset common display module I2C slave addresses by the host, detecting whether an ACK signal for pulling down SDA by the slave is received after each address, if all candidate addresses are traversed to have no ACK, judging that no effective display module exists under the current IOVDD gear, and stopping detection of the gear; Step B3, reading the register ID to verify the effectiveness of the module, immediately writing the ID register address defined by the manufacturer into the slave address by the host after receiving the ACK, then sending out repeated starting conditions and readying in a reading mode, receiving the ID value returned by the slave, sending NACK after last byte, ending transmission, and finally comparing the read ID with a pre-stored effective list, and confirming that the read ID is legal display module if the read ID is matched with the pre-stored effective list; Step B4, locking IOVDD and entering a bus type identification stage, after initializing MIPI DSI PHY and configuring a clock and a data channel, sending DSI GENERIC READ a DCS ID of a command reading module, and if a response packet which accords with MIPI specification and has correct ECC/CRC check is received, judging that the response packet is a MIPI display module; And step B5, based on the locking voltage, executing bus type identification, respectively executing MIPI DSI identification and LVDS identification after the system locks IOVDD level, and controlling an analog switch SEL signal to select a corresponding channel and closing the driving of the other interface according to the identification result.
- 4. The dual bus self-switching display interface and noninductive backlight adjustment method as set forth in claim 3, wherein the performing MIPI DSI identification is performed by: After the system initializes MIPI DSI PHY and configures the dsi_clk and dsi_d0-D3 channels, it sends DSI GENERIC READ a DCS ID of the command read module, and if a response packet meeting the MIPI specification and having correct ECC/CRC check is received, it is determined as the MIPI display module.
- 5. The dual bus self-switching display interface and noninductive backlight adjustment method as set forth in claim 3, wherein the performing LVDS identification is performed by: and the system enables LVDS PHY output, sends DE, HS and VS synchronous time sequence signals and test pixel data, reads a module internal state register through I2C, and judges that the module is an LVDS display module if the module is successfully obtained and the content of the module accords with LVDS characteristics.
- 6. The dual bus self-switching display interface and the noninductive backlight adjustment method according to claim 1, wherein the step S4 is implemented by: step C1, constructing a hardware circuit, determining a high-low voltage domain, and respectively constructing a level conversion unit consisting of an N-channel MOS tube and a pull-up resistor for RST, I2C and INT signals; Step C2, when the core board outputs high and low levels, the MOS tube is turned off or turned on, the low-voltage side signal is automatically converted into a high-voltage side level matched with IOVDD, and when the interrupt signal is reversely transmitted, the high-voltage to low-voltage level falls back and is released through the cooperation of the body diode and the channel conduction; Step C3 ADJ LDO once the target IOVDD is locked, provides high side pull-up power to all MOS level conversion units, automatically seamlessly adapting the logic levels of RST, I2C and INT signals to current IOVDD.
- 7. The dual bus self-switching display interface and the noninductive backlight adjustment method according to claim 1, wherein the step S5 is implemented by: Step D1, periodically collecting images, periodically waking up a camera by creating a timer thread or a kernel work queue, sequentially opening equipment nodes, configuring a YUYV format, applying for and mapping a DMA buffer area, starting a video stream, capturing a frame of images, stopping collecting and closing the camera; Step D2, automatically selecting a brightness extraction strategy according to an image format, namely directly taking Y components from a YUV image, calculating an RGB image according to a formula, directly using pixel values for RAW or gray level images, and calculating the average ambient brightness value of the whole frame image according to the pixel values; And D3, outputting a result, and transmitting the calculated ambient brightness value to the backlight control module.
- 8. The dual bus self-switching display interface and the noninductive backlight adjustment method according to claim 1, wherein the step S6 is implemented by: after successfully obtaining the ambient brightness value M, the following actions are performed: comparing the ambient brightness with a target threshold, comparing the current ambient brightness value M with a preset target brightness threshold K, and judging the adjusting direction by combining the hysteresis interval width delta H; judging whether the backlight needs to be turned up, if M is smaller than K-delta H, judging that the current environment is too dark, and increasing the PWM duty ratio D of the backlight by a fixed step delta D; Judging whether the backlight needs to be turned down, if M is more than K+delta H, judging that the current environment is too bright, and reducing the PWM duty ratio D of the backlight by a fixed step delta D; And maintaining the current brightness, and if the current brightness is equal to or less than delta H, namely the ambient brightness is in the allowable fluctuation range near the target value, maintaining the current PWM duty ratio D unchanged.
- 9. A dual-bus self-switching display interface and a non-inductive backlight adjusting system, which adopt the dual-bus self-switching display interface and the non-inductive backlight adjusting method according to any one of claims 1-8, and are characterized by comprising a system initialization module, a power management and IOVDD configuration module, a display module automatic identification and bus type discrimination module, a level self-adaptive conversion module, an ambient brightness perception and image acquisition module and a non-inductive backlight dynamic adjusting module; the system initialization module is used for configuring general purpose input/output GPIO of the core board into a high-resistance state input mode, closing an internal pull-up/pull-down resistor, and initializing an MIPI DSI controller and an LVDS physical layer PHY into a high-resistance state; The power management and IOVDD configuration module is used for generating a multi-gear preset IOVDD voltage through the combination control of the adjustable low-dropout linear voltage regulator and the multiple GPIO pins, polling different IOVDD levels, providing a proper power supply level for subsequent I2C communication, and locking the current IOVDD level once an effective display module is detected; the display module automatic identification and bus type judging module is used for scanning common equipment addresses through an I2C bus and reading register IDs under the current IOVDD level, verifying the legitimacy of the display module, respectively trying MIPI DSI and LVDS two interface protocols to carry out communication test, controlling the analog switch to select a corresponding bus channel according to the identification result, and closing the other interface driver; The level self-adaptive conversion module is used for forming a level conversion unit by utilizing an N-channel MOS tube and a pull-up resistor, and automatically matching the logic level of a reset and I2C, INT touch interrupt signal output by the core board to a high-voltage domain corresponding to the current IOVDD; The environment brightness sensing and image acquisition module is used for periodically waking up the camera module, acquiring a frame of environment image through the MIPI CSI interface, automatically selecting a brightness extraction strategy according to an image format, and calculating an average brightness value M of the whole frame of image to be used as a backlight adjustment basis; And the noninductive backlight dynamic adjusting module is used for comparing the ambient brightness value M with a preset target brightness threshold K, introducing a hysteresis interval delta H to prevent frequent jitter, and dynamically adjusting the duty ratio D of the backlight PWM signal to realize noninductive smooth adjustment.
Description
Dual-bus self-switching display interface and noninductive backlight adjusting method and system Technical Field The present invention relates to the field of image processing, and in particular, to a dual-bus self-switching display interface and a method and system for adjusting a non-inductive backlight. Background The existing core board display interface circuit only supports specific display buses, such as LVDS or MIPI bus output, when the core board needs to support two types of screen modules, the display circuit (such as a backlight circuit and a control signal) and the interface circuit cannot be combined and compatible, and the existing screen backlight adjustment needs to be realized by a sensor. The existing core board display interface circuit can not realize the problem that one interface supports two or more types of display modules, can not realize the compatibility of multiple display screen modules on a single interface, and the backlight brightness adjusting function of the prior art screen needs to depend on an optical distance sensor, and needs additional device cost In view of the foregoing, there is a need for a dual-bus self-switching display interface and a method and system for sensorless backlight adjustment to solve the drawbacks of the prior art. Disclosure of Invention Aiming at the defects of the prior art, the invention provides a double-bus self-switching display interface and a non-inductive backlight adjusting method and system, which aim to solve the problems. In order to achieve the purpose, the invention provides the following technical scheme that the dual-bus self-switching display interface and the noninductive backlight adjusting method comprise the following steps: S1, system power-on initialization, namely configuring general purpose input/output (GPIO) of a core board into a high-resistance state input mode, closing an internal pull-up/pull-down resistor, and initializing an MIPI DSI controller and an LVDS physical layer PHY into a high-resistance state; S2, controlling at least three GPIO pins to sequentially output different level combinations so as to drive an adjustable low dropout linear regulator ADJ LDO to poll and output a plurality of preset IOVDD level gears; step S3, under each IOVDD level gear, attempting to read the device address response and the register ID of the external display module through the I2C bus, locking the current IOVDD level if the effective response is successfully obtained, and then, carrying out display bus type identification based on the locked IOVDD level; Step S4, utilizing IOVDD level output by the ADJ LDO, automatically matching logic levels of a reset signal RST, an I2C signal and a touch interrupt signal INT output by a core board to IOVDD level required by an external display module through a MOS tube level self-switching circuit; Step S5, after the display module works normally, the camera module is started periodically, a current environment image is collected through the MIPI CSI interface, and brightness analysis is carried out on the collected image to obtain an environment brightness value; and S6, comparing the ambient brightness value M with a preset target brightness threshold K, and dynamically adjusting the duty ratio of the backlight PWM signal by combining a hysteresis zone mechanism. Optionally, the step S2 is implemented by: The method comprises the steps of A1, constructing a circuit, selecting an adjustable LDO chip, connecting a fixed resistor R1 between an OUT pin and an ADJ pin to construct a feedback network, respectively connecting three GPIOs of SET1, SET2 and SET3 to the ADJ pin through current limiting resistors, and connecting the pull-down resistors to the ground; step A2, initializing a system, namely initializing SET1, SET2 and SET3 to have push-pull output which is high in parallel, establishing a truth table in a program, and mapping the combination of GPIOs in a Hi-Z or Low state to four-gear IOVDD output voltage; And step A3, executing polling and level switching, sequentially polling level gears according to the order of increasing the output voltage of four gears IOVDD by the program, setting the target GPIO to be low, setting the other GPIOs to be high to configure the current voltage, delaying to initiate I2C detection after the LDO is stabilized, locking the gears and exiting the cycle if the communication is successful, and otherwise, recovering the GPIO state and continuing the polling of the next gear. Optionally, the step S3 is implemented by: Initializing an I2C controller, automatically matching the electrical attribute of the SCL/SDA pin of the I2C master controller by means of a MOS tube level self-switching circuit under the configured IOVDD level, initializing an I2C bus into a standard mode or a quick mode, and starting a seven-bit address addressing and response mechanism; Step B2, executing address scanning of the I2C equipment, sequentially broadcasting preset common dis