(1) DBI Interface
A, also known as the 80 system interface, is the common MCU excuse. The LCD interface between host processor and LCM device list as below, the LCM driver will repeated update panel display. The MCU transmits control commands and data through parallel interfaces, and refreshes the screen by updating data to the gram (Graphic RAM) that comes with the LCM module.
DBI interfaces are divided into two types: Serial Interface and parallel interface. The model is as follows:
B. describes the typical 18-bit data and 16-bit data (8-bit register control ).
The above hardware uses 18-bit data lines, control commands and parameters occupy db0 to db7 for parallel transmission, and image data is transmitted in parallel in rgb666 format.
The above hardware uses a 16-bit data line, control commands and parameters occupy db0 to db7 for parallel transmission, and image data is transmitted in parallel in rgb565 format.
C. Description of DBI Data Format
(I) for 16-bit datawidth, the typical data format is as follows:
1 cycle/1 pixel, rgb565, format: rrrrrggggggbbbbb
3 cycle/2 pixel, rgb666, format: xxxxrrrrgggggg
Xxxxbbbbbbrrrrrr
Xxxxggggggbbbbbb
3 cycle/2 pixel, rgb888, format: rrrrrrrrgggggggg
Bbbbbbbbrrrrrrrr
Ggggggggbbbbbbbb
(Ii) for 18-bit datawidth, the typical data format is as follows:
1 cycle/1 pixel, rgb666, format: rrrrrrggggggbbbbbb
3 cycle/2 pixel, rgb888, format: rrrrrrrrgggggggg
Bbbbbbbbrrrrrrrr
Ggggggggbbbbbbbb
D. Sort hardware interfaces in a timely manner
(I) hardware connection diagram:
Resx: reset; CSX: chip select; Te: tearing enable; D/CX: Register select register selection; WRX/SCL: Write control; RDX: Read control; DB [...]: transmission line.
(Ii) Write cycle:
(Iii) read cycle:
(Iv) About 6 read/write sequences in screen parameters
(2) DPI Interface
That is to say, the RGB interface uses common synchronization, clock, and signal lines to transmit specific data, and uses SPI and other control lines to complete command control. To some extent, the biggest difference between DPI and DBI is that DPI data lines are separated from control lines, while DBI is reused.
Its model is as follows:
The signal sequence diagram is as follows (note the difference between the DE mode and the Sync Mode ):
Among them, backporch and syncwidth should be allocated larger as much as possible, because it determines the starting position of the effective region, frontporch can assign a small dot (this method can be used in screen parameter drive de screen in sync mode. Note that backporch + syncwidth + frontporch is equal to the blingking value in de mode ).
I once encountered a strange phenomenon when debugging a DPI interface LCM. The RGB interface is connected with an LVDS conversion chip to an LVDS module. After the re-burning program is complete, the image can be displayed, and no image will be displayed after power-off and then power-on. Later, it was found that the power-on screen parameter initialization did not configure a CS high enable signal foot. After the program is burned, the foot is high, so it can be displayed. By default, power-on after power-off is low, so no image is displayed.
Calculation Method of DPI interface clock:
In fact, the ref value is 0. The other three parameters are subject to the settings in the screen parameters.
The clock polarity selection of DPI interfaces is described as follows:
A. First, check the data line. When the first data is transmitted, if the en is the descent edge, that is, when the valid data is transmitted, the en is low. Then: Params-> dpi.de _ Pol = lcm_polarity_falling; and vice versa;
B. vsync and hsync represent the beginning of a frame of data and a row of data respectively. When a frame falls below, set Params-> DPI. vsync_pol = lcm_polarity_falling. hsync_pol = lcm_polarity_falling; and vice versa.
C. There is no fixed requirement on the polarity of pclk. It mainly depends on the relationship between pclk and data, that is, to ensure latch to the correct data, which is the same as the pclk setting of sensor. When the first data is transmitted, if pclk is the descent edge, that is, the latch data, it is best to set Params-> DPI. clk_pol = lcm_polarity_falling; and vice versa.
(3) DPI and DBI compatibility
At present, many LCM modules can be compatible with DBI and DPI interfaces. Because IM2/im1/im0 is determined by the mobile phone motherboard, for example, 6516 supports the MCU interface, and the module can also be used on the motherboard of another DPI interface.
Another supplementary question is: the number of display digits. Because the GUI of the embedded Windows system is 16-bit, unlike the 32-bit desktop windows, the 24-Bit Bitmap is in Win CE, it can only be displayed in 16 bits, and some colors will be lost. This defect also lies in that, even if the 18 (rgb666) bits of LCM data are explicit, the GUI color accepted in the software is still 16 bits, and the rgb565 must be converted into rgb666 to be displayed in 18 bits, it is equivalent to interpolation.
(4) DSI Interface
DSI is a serial transmission method, including data, commands, and other information. The connection method is as follows:
The DSI data transmission process is as follows:
Because DSI data is encapsulated, the original transmission content is not clearly known as the DBI interface, so the solutions to some problems are different. When debugging the DIS interface LCM of otm8009a, it was found that the LCD had to press the power key to sleep twice before waking up. At first, no matter what the problem was, it was a screen problem, the last step is to modify the DSI driver public function of the LCM, that is, to set the dsi_lane0_ulp_mode parameter in dsi_enable_power to 0 to avoid DSI being in extreme sleep.
The three types of DSI are described as follows:
CABC is a method of controlling LCM backlight by using screen parameters. The biggest difference between CABC and the former method of controlling backlight by using independent gpio or PWM is: the brightness and adjustment of backlights are related to the use of LCM. When a white screen or snowflake dot is turned on, the CABC function is enabled during initialization, while the show screen is obviously highlighted after screen initialization, and the screen has no data, it is difficult to avoid white screen and snowflake points. Solution: In the LCM driver's corresponding backlight setting function, set the brightness level first, then enable CABC, that is, do not set CABC in initialization, so as to avoid the problem.
There is another problem with CABC adjustment, that is, the conflict between the brightness of DSI and the video mode of DSI. CABC is used to set the maximum brightness. The brightness filling of the LCD will be automatically adjusted as the Screen Content Changes to save power. Of course, the brightness adjustment of menus is another thing, which leads to abnormal boot images and wake-up images after sleep. The root cause is that DSI control commands are interspersed in RGB data, if the chip sending end cannot send the CABC command between RGB frames, resulting in the broken connection of the RGB image, an exception will occur.