tft lcd frame buffer made in china
I"m talking about some nxp mcu like lpc1788 with the lcd controller integrated into the chip so you don"t need to use an external lcd controller. The models you are listing don"t have the lcd controller integrated,.
The main advantage of having it external is that the lcd controller has got its own memory for the frame buffer and it"s easing the load on the cpu because once you load the data it will keep refreshing the screen without calling the cpu and it doesn"t use the cpu ram memory.
In the other case if the lcd controller is integrated in the mcu you can do some nice "tricks" like using a colour look up table or palette so that your graphics takes less memory and because the framebuffer is in your internal memory it is even easier to manipulate.
Also consider that in case of lcd controller not integrated in the panel (so by using the one integrated in the mcu or another one on board as a separate chip) you can exchange panel quite easily so you are not tied to a single manufacturer as long on the lcd side you find the same interface like the 24 bit or the 18 bit.
Now, I"m considering the case of an lcd panel of 640x480 and 8 bit per colour which leads us to 640x480x8 = 2457600 bit / 8 = 307200 / 1024 = 300 KByte of ram needed for the framebuffer.
The integrated lcd controller has got a dma which will take care of transferring the data from external ram used for the frambuffer to the lcd controller which will then translate it and send to lcd but the problem is that the external bus and also the internal bus of the mcu(difficult to draw this here :-) ) is then shared by the lcd controller, which keeps accessing the memory to continuously refresh the screen, and the mcu which is fetching instructions or variables.
Because the internal bus gives priority to the mcu it means that probably you will see tearing effect on the lcd like reported by some people on the nxp question and answer (pasting the link here takes you to the general support page and not to the answer I found) because the mcu gain priority when accessing bus and memory and lcd refresh is delayed.
In the answer I found on Nxp support, they say you can actually change priority so that lcd screen has an higher priority then the cpu, problem is that in doing so the cpu and then your software will be slowed down by the lcd controller continuously refreshing and accessing memories.
2017/03 To Small-medium TFT-LCD requirement, RAIO announce its new RA8871M/RA8873M controller, with the powerful features make the device suitable for both HVGA and WVGA display applications in the mainstream market.
2015/02RAIO launches new products - RA8876/RA8877, with up to 64M Byte external SDRAM used for frame buffer, RA8876/RA8877 is suitable for displaying up to WXGA resolution (1366x768) at 24bit colors.
The second command sets the console (tty1) to map its output to the framebuffer (buffer 1). That"s why the parameters are 1 1. You can map any tty to the LCD.
As a 2inch IPS display module with a resolution of 240 * 320, it uses an SPI interface for communication. The LCD has an internal controller with basic functions, which can be used to draw points, lines, circles, and rectangles, and display English, Chinese as well as pictures.
The 2inch LCD uses the PH2.0 8PIN interface, which can be connected to the Raspberry Pi according to the above table: (Please connect according to the pin definition table. The color of the wiring in the picture is for reference only, and the actual color shall prevail.)
The LCD supports 12-bit, 16-bit, and 18-bit input color formats per pixel, namely RGB444, RGB565, and RGB666 three color formats, this demo uses RGB565 color format, which is also a commonly used RGB format.
For most LCD controllers, the communication mode of the controller can be configured, usually with an 8080 parallel interface, three-wire SPI, four-wire SPI, and other communication methods. This LCD uses a four-wire SPI communication interface, which can greatly save the GPIO port, and the communication speed will be faster.
Framebuffer uses a video output device to drive a video display device from a memory buffer containing complete frame data. Simply put, a memory area is used to store the display content, and the display content can be changed by changing the data in the memory.
Select image buffer: The purpose of the selection is that you can create multiple image attributes, there can be multiple images buffer, you can select each image you create.
Set points of the display position and color in the buffer: here is the core GUI function, processing points display position and color in the buffer.
The fill color of a certain window in the image buffer: the image buffer part of the window filled with a certain color, usually used to fresh the screen into blank, often used for time display, fresh the last second of the screen.
Draw rectangle: In the image buffer, draw a rectangle from (Xstart, Ystart) to (Xend, Yend), you can choose the color, the width of the line, whether to fill the inside of the rectangle.
Draw circle: In the image buffer, draw a circle of Radius with (X_Center Y_Center) as the center. You can choose the color, the width of the line, and whether to fill the inside of the circle.
Write Ascii character: In the image buffer, use (Xstart Ystart) as the left vertex, write an Ascii character, you can select Ascii visual character library, font foreground color, font background color.
Write English string: In the image buffer, use (Xstart Ystart) as the left vertex, write a string of English characters, you can choose Ascii visual character library, font foreground color, font background color.
Write Chinese string: in the image buffer, use (Xstart Ystart) as the left vertex, write a string of Chinese characters, you can choose character font, font foreground color, font background color of the GB2312 encoding
Write numbers: In the image buffer,use (Xstart Ystart) as the left vertex, write a string of numbers, you can choose Ascii visual character library, font foreground color, font background color.
Display time: in the image buffer,use (Xstart Ystart) as the left vertex, display time,you can choose Ascii visual character font, font foreground color, font background color.;
2. The module_init() function is automatically called in the INIT () initializer on the LCD, but the module_exit() function needs to be called by itself
Python has an image library PIL official library link, it do not need to write code from the logical layer like C, can directly call to the image library for image processing. The following will take 1.54inch LCD as an example, we provide a brief description for the demo.
The first parameter defines the color depth of the image, which is defined as "1" to indicate the bitmap of one-bit depth. The second parameter is a tuple that defines the width and height of the image. The third parameter defines the default color of the buffer, which is defined as "WHITE".
Draw an inscribed circle in the square, the first parameter is a tuple of 4 elements, with (150, 15) as the upper left corner vertex of the square, (190, 55) as the lower right corner vertex of the square, specifying the level median line of the rectangular frame is the angle of 0 degrees, the second parameter indicates the starting angle, the third parameter indicates the ending angle, and fill = 0 indicates that the the color of the line is white.
The present invention relates to a TFT-LCD (Thin Film Transistor—Liquid Crystal Display) driving method. More particularly, the present invention relates to a TFT-LCD driving method utilizing an over-drive technique.
When an appropriate gray level voltage is applied to a pixel in a TFT LCD panel, the angle of liquid crystal molecule in the pixel will change correspondingly. This angle change further alters transmittance of the TFT-LCD panel so a desired gray level can be achieved. However, due to the intrinsic property of liquid crystal molecule, if the gray level has to change dramatically during two successive refresh periods, the desired angle change may not be achieved in one refresh period. This results in a blurred display, and the situation is particularly bad for a motion picture display.
FIG. 3 is a block diagram showing a TFT-LCD driving system utilizing the over-drive technique. Timing controller 30 retrieves Gnframe image data from an image data source, and retrieves a previous Gn-1frame image data from a frame buffer 32. Timing controller 30 then compares the Gnand Gn-1frame image data and addresses the pixels that need to be updated. Subsequently, timing controller 30 retrieves the Look-Up Table 34 stored in a memory, and converts the image data in the updated pixels to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel via a source driver.
However, the TFT-LCD driving system utilizing the over-drive technique still has some drawbacks. First, only the pixels where image data has to change during the two successive refresh periods will be updated. This requires several frame buffers to store the previous frame image data in order to compare the image data in the same pixel during the two successive refresh periods. However, frame buffers are expensive and dramatically increase the TFT-LCD manufacture cost. Besides, the Look-Up Table utilized in the over-drive technique is usually stored in EEPROM (Electrically Erasable Programmable Read-Only Memory). If the bits of the driving system were increased, the corresponding Look-Up Table would expand as well, and the memory capacity would also have to increase. This would further raise the manufacturing cost. SUMMARY
Still another objective of the present invention is to provide a TFT-LCD driving system where memory capacity required for storing the Look-Up Table can be minimized.
In accordance with the foregoing and other objectives of the present invention, a TFT-LCD driving method utilizing the over-drive technique is proposed. A bias voltage is first applied to the pixel so the gray level displayed by the pixel changes from an initial gray level to a baseline gray level. Then a target gray level voltage is converted to a corresponding over-drive gray level voltage. Subsequently, the over-drive gray level voltage is applied to the pixel so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
In accordance with another objective of the present invention, a TFT-LCD utilizing the over-drive technique is proposed. The TFT-LCD includes a panel, a bias source, a timing controller, and a source driver. The panel comprises pixel matrix. The bias source is used for providing a bias voltage so the gray level displayed by the pixel can change from the initial gray level to a baseline gray level. The timing controller converts a target gray level voltage to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel via the source driver, so the gray level displayed by the pixel changes from the baseline gray level to the required target gray level.
The present invention is directed to a driving method for a TFT-LCD, which allows the pixel to achieve the desired target gray level more rapidly, and the frame buffer is no longer required in the driving system. Additionally, the memory capacity required for storing the Look-Up Table can be minimized. The overall manufacture cost can be further reduced. Moreover, the present invention can simplify the integrated circuit design and the chip size. The power consumption and the blurring effect can also be minimized. The present invention is particularly suitable for motion picture display. BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 4 demonstrates the TFT-LCD driving method according to one preferred embodiment of the present invention. A bias voltage is first applied to the pixel (step 402), so the gray level displayed by the pixel changes from an initial gray level in a previous frame image to a baseline gray level. Any gray level can be selected as the baseline gray level. For example, in an 8-bits driving system, the baseline gray level can be set to the lowest gray level L0or the highest gray level L255. Other appropriate gray level can be selected as the baseline gray level based upon the initial gray level, as long as all pixels return from their respective initial gray level to the same baseline gray level. A target gray level voltage is then retrieved from a image data source, and converted to a corresponding over-drive gray level voltage (step 404). The correlation between the target gray level voltage and the over-drive gray level voltage can be obtained by either a Look-Up Table or a transformation formula. Subsequently, the over-drive gray level voltage is applied to the pixel (step 406) so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
FIG. 5 is a block diagram illustrating the TFT-LCD driving method according to one preferred embodiment of the present invention. The bias voltage applied to the pixel (step 402) is supplied by an external bias buffer. The external bias buffer 50 is coupled to an output 54 of a source driver 52. When the pixel 56 needs to change from an initial gray level to a baseline gray level, the external bias buffer 50 provides a bias voltage to the output 54 of the source driver 52, so the gray level displayed by the pixel 56 changes from the initial gray level to the baseline gray level.
Moreover, the source driver 52 can provide the bias voltage required for the pixel 56 to return to the baseline gray level itself. By modifying the circuitry of the source driver 52, the bias voltage is supplied to the pixel 56 directly after the source driver 52 provides the initial gray level voltage to the pixel 56 in a previous frame image.
FIG. 6 shows the relation between time and the gray level voltage of the pixel in a Normally Black system according to one preferred embodiment of the present invention. During a bias period 60, the external bias buffer 50 provides the bias voltage to the output 54 of the source driver 52. The gray level voltage 62 of the pixel is then biased on the baseline gray level voltage.
The bias voltage supplied to the pixel can be equal to the baseline gray level voltage. Alternatively, by employing the over-drive technique again, a bias voltage that is higher or lower than the baseline gray level voltage can be supplied, so the pixel can change from the initial gray level to the baseline gray level more rapidly. FIG. 7 illustrates the relation between the gray level voltage and transmittance of the TFT-LCD in an 8-bits Normally Black system. If the lowest gray level L0is selected as the baseline gray level, all pixels are updated to a normally black state after the previous frame image data was written. The external bias buffer 50 provides a common voltage VCOMlower than the baseline gray level voltage V0, so the gray level displayed by the pixel can change more rapidly from the initial gray level to the baseline gray level L0.
Similarly, the over-drive technique can also be employed in a Normally White system so the pixel can return to the baseline gray level more rapidly. FIG. 8 shows the relation between the gray level voltage and transmittance of the TFT-LCD in an 8-bits Normally White system. If the lowest gray level L0is selected as the baseline gray level, in positive polarity, an analog voltage VDDA higher than the baseline gray level voltage V0is provided as the bias voltage. In negative polarity, a ground voltage VGNDlower than the baseline gray level voltage V0is provided as the bias voltage.
After the gray level displayed by the pixel returns from the initial gray level to the baseline gray level by the bias voltage provided by the external bias buffer 50, a target gray level voltage is retrieved from the image data source and converted to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
FIG. 9 is a block diagram demonstrating the conversion of the target gray level voltage to the corresponding over-drive gray level voltage according to one preferred embodiment of the present invention. After the gray level voltage of the pixel changes from the initial gray level to the baseline gray level by the external bias buffer 50, timing controller 90 retrieves a target gray level voltage Vyof next frame image data form a image data source. The timing controller 90 then converts the target gray level voltage Vyto a corresponding over-drive gray level voltage Vy′.
According to one preferred embodiment of the present invention, the driving method according to the present invention allows the pixel to achieve the desired target gray level more rapidly, and the frame buffer is no longer required in the driving system. Additionally, the memory capacity required for storing the Look-Up Table can be minimized. The overall manufacture cost can be further reduced. Moreover, the present invention can simplify the integrated circuit design and the chip size. The power consumption and the blurring effect can also be minimized. The present invention is particularly suitable for motion picture display.
I have STM32F407 Boards like STM32F407 Disco board (without TFT) and some basic Chinese Boards. I have interfaced my TFT LCD with the board using FSMC interface and done basics like text, graphic shapes and images. So the driver is in place I think.
Now I want to introduce Touchgfx to make my GUI lively. But as far as I understand STM32F407 needs external RAM and ROM to store images and full frame buffer to be used by touchgfx to be more effective. Also FreeRTOS and my application code also needs to be added.
It"ll be a big help to those who are unsure of compiling the kernel, etcYes, and I guess that will include most of the Raspberry Pi userbase. Hopefully it will boost the use of these LCDs on the Pi. And plug&play displays like yours, make it even easier.
I tried to download the latest version •2013-02-09-wheezy-raspbian-2013-04-11-fbtft.zip - but its a dead link for me?Can you try again, I have moved the file to another server.
Also I read on Kamal"s blog ( http://www.whence.com/rpi/) that the sainsmart spi bus can be used up to 32mhz, but your driver defaults to 4mhz, the same as the adafruit unit. The adafruit display has an extra buffer chip inline so cannot be used at 32mhz, but the sainsmart does not so it can be run faster. My chinese display also does not have the extra buffer. Playing video back using mplayer seems a lot slower than that of Kamal"s kernel as well - have you tried it?
Also I read on Kamal"s blog ( http://www.whence.com/rpi/) that the sainsmart spi bus can be used up to 32mhz, but your driver defaults to 4mhz, the same as the adafruit unit. The adafruit display has an extra buffer chip inline so cannot be used at 32mhz, but the sainsmart does not so it can be run faster. My chinese display also does not have the extra buffer. Playing video back using mplayer seems a lot slower than that of Kamal"s kernel as well - have you tried it?If you don"t have a levelshifter you can go full speed (yes, the adafruit18fb default is 4MHz, picked up from Kamal"s work).
spidevices: adafruit18fb spi0.1 32000kHz 8 bits mode=0x00Now lets load the driver telling it to display the transfer time for each frame sent (https://github.com/notro/fbtft/wiki/Debug):
graphics fb1: adafruit18fb frame buffer, 40 KiB video memory, 4 KiB buffer memory, fps=50, spi0.1 at 32 MHzAs you see, I could run this at 65 fps instead of 50 as I set to be the maximum.
The present invention relates to a TFT-LCD (Thin Film Transistor—Liquid Crystal Display) driving method. More particularly, the present invention relates to a TFT-LCD driving method utilizing an over-drive technique.
When an appropriate gray level voltage is applied to a pixel in a TFT LCD panel, the angle of liquid crystal molecule in the pixel will change correspondingly. This angle change further alters transmittance of the TFT-LCD panel so a desired gray level can be achieved. However, due to the intrinsic property of liquid crystal molecule, if the gray level has to change dramatically during two successive refresh periods, the desired angle change may not be achieved in one refresh period. This results in a blurred display, and the situation is particularly bad for a motion picture display.
FIG. 3 is a block diagram showing a TFT-LCD driving system utilizing the over-drive technique. Timing controller 30 retrieves Gnframe image data from an image data source, and retrieves a previous Gn-1frame image data from a frame buffer 32. Timing controller 30 then compares the Gnand Gn-1frame image data and addresses the pixels that need to be updated. Subsequently, timing controller 30 retrieves the Look-Up Table 34 stored in a memory, and converts the image data in the updated pixels to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel via a source driver.
However, the TFT-LCD driving system utilizing the over-drive technique still has some drawbacks. First, only the pixels where image data has to change during the two successive refresh periods will be updated. This requires several frame buffers to store the previous frame image data in order to compare the image data in the same pixel during the two successive refresh periods. However, frame buffers are expensive and dramatically increase the TFT-LCD manufacture cost. Besides, the Look-Up Table utilized in the over-drive technique is usually stored in EEPROM (Electrically Erasable Programmable Read-Only Memory). If the bits of the driving system were increased, the corresponding Look-Up Table would expand as well, and the memory capacity would also have to increase. This would further raise the manufacturing cost. SUMMARY
Still another objective of the present invention is to provide a TFT-LCD driving system where memory capacity required for storing the Look-Up Table can be minimized.
In accordance with the foregoing and other objectives of the present invention, a TFT-LCD driving method utilizing the over-drive technique is proposed. A bias voltage is first applied to the pixel so the gray level displayed by the pixel changes from an initial gray level to a baseline gray level. Then a target gray level voltage is converted to a corresponding over-drive gray level voltage. Subsequently, the over-drive gray level voltage is applied to the pixel so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
In accordance with another objective of the present invention, a TFT-LCD utilizing the over-drive technique is proposed. The TFT-LCD includes a panel, a bias source, a timing controller, and a source driver. The panel comprises pixel matrix. The bias source is used for providing a bias voltage so the gray level displayed by the pixel can change from the initial gray level to a baseline gray level. The timing controller converts a target gray level voltage to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel via the source driver, so the gray level displayed by the pixel changes from the baseline gray level to the required target gray level.
The present invention is directed to a driving method for a TFT-LCD, which allows the pixel to achieve the desired target gray level more rapidly, and the frame buffer is no longer required in the driving system. Additionally, the memory capacity required for storing the Look-Up Table can be minimized. The overall manufacture cost can be further reduced. Moreover, the present invention can simplify the integrated circuit design and the chip size. The power consumption and the blurring effect can also be minimized. The present invention is particularly suitable for motion picture display. BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 4 demonstrates the TFT-LCD driving method according to one preferred embodiment of the present invention. A bias voltage is first applied to the pixel (step 402), so the gray level displayed by the pixel changes from an initial gray level in a previous frame image to a baseline gray level. Any gray level can be selected as the baseline gray level. For example, in an 8-bits driving system, the baseline gray level can be set to the lowest gray level L0or the highest gray level L255. Other appropriate gray level can be selected as the baseline gray level based upon the initial gray level, as long as all pixels return from their respective initial gray level to the same baseline gray level. A target gray level voltage is then retrieved from a image data source, and converted to a corresponding over-drive gray level voltage (step 404). The correlation between the target gray level voltage and the over-drive gray level voltage can be obtained by either a Look-Up Table or a transformation formula. Subsequently, the over-drive gray level voltage is applied to the pixel (step 406) so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
FIG. 5 is a block diagram illustrating the TFT-LCD driving method according to one preferred embodiment of the present invention. The bias voltage applied to the pixel (step 402) is supplied by an external bias buffer. The external bias buffer 50 is coupled to an output 54 of a source driver 52. When the pixel 56 needs to change from an initial gray level to a baseline gray level, the external bias buffer 50 provides a bias voltage to the output 54 of the source driver 52, so the gray level displayed by the pixel 56 changes from the initial gray level to the baseline gray level.
Moreover, the source driver 52 can provide the bias voltage required for the pixel 56 to return to the baseline gray level itself. By modifying the circuitry of the source driver 52, the bias voltage is supplied to the pixel 56 directly after the source driver 52 provides the initial gray level voltage to the pixel 56 in a previous frame image.
FIG. 6 shows the relation between time and the gray level voltage of the pixel in a Normally Black system according to one preferred embodiment of the present invention. During a bias period 60, the external bias buffer 50 provides the bias voltage to the output 54 of the source driver 52. The gray level voltage 62 of the pixel is then biased on the baseline gray level voltage.
The bias voltage supplied to the pixel can be equal to the baseline gray level voltage. Alternatively, by employing the over-drive technique again, a bias voltage that is higher or lower than the baseline gray level voltage can be supplied, so the pixel can change from the initial gray level to the baseline gray level more rapidly. FIG. 7 illustrates the relation between the gray level voltage and transmittance of the TFT-LCD in an 8-bits Normally Black system. If the lowest gray level L0is selected as the baseline gray level, all pixels are updated to a normally black state after the previous frame image data was written. The external bias buffer 50 provides a common voltage VCOMlower than the baseline gray level voltage V0, so the gray level displayed by the pixel can change more rapidly from the initial gray level to the baseline gray level L0.
Similarly, the over-drive technique can also be employed in a Normally White system so the pixel can return to the baseline gray level more rapidly. FIG. 8 shows the relation between the gray level voltage and transmittance of the TFT-LCD in an 8-bits Normally White system. If the lowest gray level L0is selected as the baseline gray level, in positive polarity, an analog voltage VDDA higher than the baseline gray level voltage V0is provided as the bias voltage. In negative polarity, a ground voltage VGNDlower than the baseline gray level voltage V0is provided as the bias voltage.
After the gray level displayed by the pixel returns from the initial gray level to the baseline gray level by the bias voltage provided by the external bias buffer 50, a target gray level voltage is retrieved from the image data source and converted to a corresponding over-drive gray level voltage. The over-drive gray level voltage is then applied to the pixel so the gray level displayed by the pixel changes from the baseline gray level to the target gray level.
FIG. 9 is a block diagram demonstrating the conversion of the target gray level voltage to the corresponding over-drive gray level voltage according to one preferred embodiment of the present invention. After the gray level voltage of the pixel changes from the initial gray level to the baseline gray level by the external bias buffer 50, timing controller 90 retrieves a target gray level voltage Vyof next frame image data form a image data source. The timing controller 90 then converts the target gray level voltage Vyto a corresponding over-drive gray level voltage Vy′.
According to one preferred embodiment of the present invention, the driving method according to the present invention allows the pixel to achieve the desired target gray level more rapidly, and the frame buffer is no longer required in the driving system. Additionally, the memory capacity required for storing the Look-Up Table can be minimized. The overall manufacture cost can be further reduced. Moreover, the present invention can simplify the integrated circuit design and the chip size. The power consumption and the blurring effect can also be minimized. The present invention is particularly suitable for motion picture display.
Alternatively, it may be possible to design an expansion board that plugs into the LCD headers on the R.Pi. Here is something similar for Beagleboard:
Parallel interface displays can be found in many sizes, usually up to 7" and more. Parallel interfaces are usually 8 or 16-bits wide (sometimes 18 or 24-bit wide), plus some control-lines. The Raspberry Pi P1-connector does not contain enough GPIOs for 16-bit wide parallel displays, but this could be solved by borrowing some GPIOs from the CSI-connector or from P5 (on newer Raspberry Pis). Alternatively, some additional electronics (e.g. shift-registers or a CPLD) can be used, which could also improve the framerate or lower the CPU-load.
AdvaBoard RPi1: Raspberry Pi multifunction extension board, incl. an interface and software for 3.2"/5"/7" 16-bit parallel TFT-displays incl. touchscreen with up to 50 frames/s (3.2", 320x240)
Texy"s 2.8" TFT + Touch Shield Board: HY28A-LCDB display with 320 x 240 resolution @ 10 ~ 20fps, 65536 colors, assembled and tested £24 plus postage, mounts on GPIO pins nicely matching Pi board size, or via ribbon cable
I have STM32F407 Boards like STM32F407 Disco board (without TFT) and some basic Chinese Boards. I have interfaced my TFT LCD with the board using FSMC interface and done basics like text, graphic shapes and images. So the driver is in place I think.
Now I want to introduce Touchgfx to make my GUI lively. But as far as I understand STM32F407 needs external RAM and ROM to store images and full frame buffer to be used by touchgfx to be more effective. Also FreeRTOS and my application code also needs to be added.
I changed the Adafruit libraries for TFT: GFX , TFTLCD and TouchScreen. I join all in this one library, the library SPFD5408, to avoid problems with duplicate libraries and enables also have the original library Adafruit ready for use in other projects with another TFT hardware.
Different displays use different types of TCONs. In this article we will be talking about TCONs for the IT market: LCD (Liquid Crystal Display) notebook PCs and monitors.
An LCD panel has millions of Red, Green, and Blue (RGB) liquid crystals that are used to block a white backlight when electrical voltage is applied to them. High voltage signals to each individual pixel control how much of the backlight to block. A white display means nothing is being blocked. A black display means all three colors are blocked at maximum effort.
While the GPU is responsible for transforming mathematical equations into individual pixels and frames, a TCON takes the individual frames generated by the GPU, corrects for color and brightness, then sends out parts of the image to each individual driver at the panel’s specific timing.
VESA DisplayHDR600 Requires local dimming. No LCD panel can reach the VESA DisplayHDR600 requirement of 6000:1 contrast ratio. However, this can be overcome with local dimming.
The primary goal of color management is to obtain a good match across color devices; for example, the colors of one frame of a video should appear the same on a computer LCD monitor, on a TV screen, and as a printed poster. Color management helps to achieve the same appearance on all of these devices, provided the devices are capable of delivering the needed color intensities. Color management cannot guarantee identical color reproduction, as this is rarely possible, but it can at least give more control over any changes which may occur.
Panel Self-Refresh (PSR) – frame buffer in a TCON can maintain a display image without receiving video data from the CPU. For a still image, this allows the GPU to enter a low-power state and the eDP main link to turn off. Allowing the GPU to power down between display updates will save significant power and extend battery life.
Except when watching a movie or playing a game, there are many times when the video does not change for multiple frames. PSR saves power for full-screen images.
Panel Self-Refresh with Selective Update (PSR2) is a superset of the panel self-refresh feature and it allows the transmission of modified areas within a video frame with obvious benefits when watching a movie or playing a game. PSR2 identifies when only a portion of the screen is static, which is a selective update. In PSR2, when the full screen is static, the refresh rate can be lowered for further power savings as done by Intel Low Refresh Rate (LRR). Intel LRR lowers the refresh rate by changing pixel clock or by changing vertical blank depending on the scenario such as idle, playing video, browsing, etc. All Analogix TCONs support Intel LRR.
Dynamic overdrive changes the overdrive parameters depending on the situation. Overdrive and PSR can share the same frame buffer. This enhances the experience of all kinds of applications including gaming and video editing.
I"m considering making a PJRC product for a 3.5 inch TFT touchscreen display with 480x320 resolution. Conceptually, it would be pretty similar to this Adafruit product (https://www.adafruit.com/products/2050), with SPI interface on the bottom side and 8 bit parallel interface on the top.
A couple major decisions to make are the type of TFT and touchscreen. IPS displays are available, which offer superior color range and wide viewing angles. Normal TN types, like we have now with the common 2.8 inch side, are less expensive. Likewise, touchscreens come in cheap resistive which detects only a single touch point and requires significant pressure, or more expensive capacitive touch that works similar to cell phones and tablets. Different touch controller chips can be used, some detecting 2 touch points, others up to 5 points.
I"m actually waiting right now for a first spin of PCBs to come back from China to support a 3.2" display (this one (http://www.buydisplay.com/default/serial-spi-3-2-inch-tft-lcd-module-display-ili9341-power-than-sainsmart) from buydisplay.com). My board actually has a socket for Teensy (3.2 or 3.5/6), so acts as a baseboard with breakouts for a few GPIOs, I2C & USB host. I"ve also thrown in an ambient light sensor & audio amp. I would much preferred to have a larger display with more pixels and multi-point touch but sourcing LCDs is not easy for small quantities. This board, called BB0, looks like this:
My previous builds used an existing LCD modules with Teensy on a separate (hand wired) baseboard. Combining the two boards makes the whole thing smaller and simpler. Consider having a spot on the back to drop a Teensy right on. And also consider offering multiple versions of the PCB (i.e. propshield/propshield LC) with differing sets of support circuitry if that"s not possible.
... agree with Frank - the adafruit 3.5 inch TFT touchscreen display with 480x320 (https://www.adafruit.com/products/2050) has RAM buffer so it should be good from Teensy if an UNO can do it. Also the faster 8 bit interface using 12 pins would be cool if the Teensy underside pins could be used to keep edge pins and SPI free.
This display has a controller built into it with RAM buffering, so that almost no work is done by the microcontroller.*The display can be used in two modes: 8-bit or SPI.*For 8-bit mode, you"ll need 8 digital data lines and 4 or 5 digital control lines to read and write to the display (12 lines total). SPI mode requires only 5 pins total (SPI data in, data out, clock, select, and d/c) but is slower than 8-bit mode. In addition, 4 pins are required for the touch screen (2 digital, 2 analog)
Dear Paul. Another fantastic project. My preference would be for at least a minimally daylight readable display option even if that cost extra. I have several hand held meter projects using the touch sensitive TFT display and it is unreadable even in very bright room light. Hence my desire for a brighter display.
Any suggested pin connections for the Buydisplay display with cap touch listed above?http://www.buydisplay.com/default/serial-spi-3-5-inch-tft-lcd-module-in-320x480-optl-touchscreen-ili9488 I may try laying out an Oshpark board myself. I think if I do it I may put in holes so the outside pins on a 3.6 at least will fit. Any suggestions on pins to use or keep open for other hardware are most welcome. I am assuming the prop and audio shield cs pins should be avoided.
Any suggested pin connections for the Buydisplay display with cap touch listed above?http://www.buydisplay.com/default/serial-spi-3-5-inch-tft-lcd-module-in-320x480-optl-touchscreen-ili9488 I may try laying out an Oshpark board myself. I think if I do it I may put in holes so the outside pins on a 3.6 at least will fit. Any suggestions on pins to use or keep open for other hardware are most welcome. I am assuming the prop and audio shield cs pins should be avoided.
@Matadormac - You may want to Google for sunlight readable TFT LCD display and compare the ribbon cable connector pinouts. I believe I found a 7-inch display that is compatible with the RA8875 adaptor sold at AdaFruit. It has a 40 pin cable and the pin outs match. The display brightness is 630 to 800 nits. I have not checked a similar 5-inch display or other sizes, but feel they may exist too. The display I found is a NewHaven Display NHD-7.0-800480EF-ASXN#-CTP available on DigiKey. Sure it costs 2x more that the 7-inch 200 nit display on AdaFruit, but I"m interested in sunlight readable too. I intend to check this out (verify) in a month or so when I order my project parts. I will post back here with results. NewHaven Display also has SSD1963 based controller boards for a reasonable cost.
Waking this thread until a better answer … the T4 Beta thread shows interest in a larger display - the ili9488 is functional on T_3.6 and T4 - but 18 bit color is too many bytes for fast SPI updates - and the with a couple different 9488"s under test - some seem to have issues. Touch XPT2036 works - but Display I got like Paul"s {p#1470&1473} (https://forum.pjrc.com/showthread.php?p=197363#post197363)shows MISO not tristated - so reading Touch means cutting/not connecting the TFT"s MISO then it works with write only display. Most recent notes cluttering T4 thread are here XX (https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=200250&viewfull=1#post200250)
I guess that it it’s time to think about a “Teensy G”, a graphics (sub-)processor which would communicate with whatever “main” Teensy through a simple command set, similar to the gfx libraries and which would then care about rendering, frame buffering and efficient high-speed communication with the TFT, taking all that load away from the principal MCU.
3.5" 320x240, $64, SPI, capactive touch, FTDI FT813 Embedded Video Engine, sunlight readable TFT, open source drivers: https://www.newhavendisplay.com/nhd35320240ftcsxnctp-p-9561.html
3.5" 320x240, $51, SPI, resistive touch, FTDI FT812 Embedded Video Engine, sunlight readable TFT, open source drivers, https://www.newhavendisplay.com/nhd35320240ftcsxnt-p-9562.html
Other displays (3.5" 320x240, 4.3" 480x272, 5" 800x480, 7" 800x480, different display/touch features): https://www.newhavendisplay.com/eve2-tft-modules-c-1_990_992.html
Without having looked it up, I’d guess that in the meantime, a few TFT controllers with QSPI interface should be available, thus making the bottleneck four times wider...
I"m looking forward to getting it to work - I"m following this schematic (http://www.lcdwiki.com/res/MSP3520/3.5%E5%AF%B8SPI%E6%A8%A1%E5%9D%97%E5%8E%9F%E7%90%8 6%E5%9B%BE.pdf) for wiring (Note the pin order is opposite on the buydisplay FPC) - there are minor differences, but the schematics seems pretty inline with the ILI9488 datasheed pin assignment
@Rezo - The one of theirs I have I think is one of these: https://www.buydisplay.com/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board
Also with things like Frame buffer, I did not want to go through all of the work to somehow make the frame buffer to work with 24 bits and DMA, so instead by default it stores as the same 16 bits as the colors we use and then when the screen is updated, it converts the 16 bits to 24 bits to output. If the operation is DMA than, this is done a buffer at a time, first at the start up to fill the first buffers and start up the DMA operation, and then it triggers an ISR when a buffer output is complete, and it converts the next portion of the frame into the buffer... So system overhead there as well.
BUT I do have an option for T4.1 with external memory, where you can setup the Frame buffer for 32 bit pixels. Only 24 bits are used, conversation done when stored and DMA is setup to transfer 32 bits to the SPI.TDR register and SPI configured to transfer 24 bits out... So maybe wasted memory but no system overhead to output over DMA... I keep wanting to cleanup some of this code to allow it be configured by sketch instead of header file options... But I have not done so.
@Rezo - The one of theirs I have I think is one of these: https://www.buydisplay.com/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board
Also with things like Frame buffer, I did not want to go through all of the work to somehow make the frame buffer to work with 24 bits and DMA, so instead by default it stores as the same 16 bits as the colors we use and then when the screen is updated, it converts the 16 bits to 24 bits to output. If the operation is DMA than, this is done a buffer at a time, first at the start up to fill the first buffers and start up the DMA operation, and then it triggers an ISR when a buffer output is complete, and it converts the next portion of the frame into the buffer... So system overhead there as well.
BUT I do have an option for T4.1 with external memory, where you can setup the Frame buffer for 32 bit pixels. Only 24 bits are used, conversation done when stored and DMA is setup to transfer 32 bits to the SPI.TDR register and SPI configured to transfer 24 bits out... So maybe wasted memory but no system overhead to output over DMA... I keep wanting to cleanup some of this code to allow it be configured by sketch instead of header file options... But I have not done so.
I am using the T4 with the HX display but I purchased two T4.1"s with the PSRAM chips for the option of a bigger frame buffer for the 9488 - has the library been updated to utilize the extra RAM or is it something still being worked on?
Over time, I would like to have an option or sub-class or ??? where you can define if you wish the TFT to use 1 byte 2 bytes or 4 bytes per pixel in the Frame buffer.
Over time, I would like to have an option or sub-class or ??? where you can define if you wish the TFT to use 1 byte 2 bytes or 4 bytes per pixel in the Frame buffer.