IPS-дисплеи на контроллерах ST7789 и ST7735

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Hello, friends! Low quality TN LCD displays have been the only option available for use in MCU based projects for some time, with bad color reproduction, poor viewing angles. But the situation is changing, slowly but surely. At first OLED displays appeared on the market with their inherent issues like high price, small choice of sizes and resolutions, pixel burnout. And recently we're getting more and more of IPS LCD displays. Two models of such displays are on the review today. As you can see the displays are miniature. One of them is square, has diagonal size of 33mm (1.3") and resolution of 240 by 240 pixels. That gives us a respectable pixel density of 261 PPI. Second display has 2:1 aspect ratio, resolution of 80 by 160 pixels (because it is logically addressed in portrait mode) and diagonal size of 24mm (0.96") resulting 186 PPI. The displays themselves are very thin - less than 2 mm without PCB. The PCB is practically a passive backplane. There is only one transistor to manage the backlight level. In general it is an adapter between display stub and connector pins. By the way these displays are way cheaper without PCBs so you can buy them separately if you're designing your own PCB. Both displays use controller chips from Sitronix. It's ST7789 for the square display and ST7735 for rectangular one. Both of these controllers are from the same model family but are designed for different display sizes. They have a lot in common: some registers, some command codes. But there are differences, too. As result the initialization procedures are different for these controllers but overall operation is basically the same on both models. It's easy to program the displays: at first you input region selection commands to define width, height and position of region to work with. Then you send a color data transfer command and the color data itself to fill the selected region. You can work with whole display and with region of interest as well. Both controllers have built-in frame buffer - internal RAM whose content is displayed on screen and transferred by sending commands via connection interface. You can keep frame buffer inside MCU memory, too, and simply copy it over to display. But you need a substantial amount of RAM for it. For example this square display requires 115 KB of RAM and rectangular one takes 25.5 KB. Besides the full screen refresh rate will be quite low because of slow interface speed. I'll show it in a demo. Display controllers have different interfaces to connect to MCU: several variations of parallel interface and SPI. But the parallel interface is not traced to connector pins. This is not only because of PCB design but due to lack of proper interface on display stub. So there is no practical way to use these displays with parallel interface. The only option is SPI connection. There is 3.3V power pin on display connector. Then there are lines for SPI clock and data. Specifically SDA is a MOSI line for data load into display. Next is the pin for display controller reset. DC line is used to specify the type of SPI transfer: command or data. CS is a chip select line. And finally BLK pin is used for turning display backlight on and off. As I've mentioned there is a regulating transistor on PCB that turns backlight on or off according to logical level on BLK pin. You can gradually regulate backlight intensity using PWM. There is no chip select pin on the square display for no apparent reason . CS line is present on the display stub but it is set to active low somewhere on the PCB so the display is always active and waiting for command input. It's not a big problem if this display is the only device on your SPI bus. There are three color modes available: 12-bit, 16-bit and 18-bit. There are 4 bits on each (R, G, B) color component in 12-bit mode. so 12 bits (or 1.5 bytes) are transferred on SPI bus for each pixel. This mode gives us around 4000 different colors. 16-bit mode has more complex bit allocation: red and blue components have 5 bits, green component has 6 bits. This is so-called RGB565 color encoding. Two full bytes are transferred to display controller for each screen pixel. There are more than 65 thousand colors in this mode. There are 6 bits for each color component in 18-bit mode. This data is transferred in 3 bytes sequence on SPI bus, one byte per color component, 2 lesser bits are not used in each byte - it's not an effective bandwidth utilization but it helps to increase color fidelity. This mode can reproduce about 262 thousand colors. I think that the most effective is 16-bit color mode, so we will use it in our demo. Let's look at demo board. It's based on STM32 MCU. There is an SD card slot to store images we will display on our screens. There is also a button to switch between modes. First test is a solid color fill of full display area. This test demonstrates us screen refresh time. It is 71 ms for this rectangular display at 18MHz SPI clock. * DMA transfer may significantly increase refresh rate but requires additional buffer in MCU RAM. White fill shows us backlight uniformity. I hope you can see this darker stripe on the left side where actually backlight LED is placed. The rest of the screen is evenly lit with exclusion of this left side stripe. It's not that bad in real life situations. Next test is text type-out with smooth backlight fade using PWM on BLK pin. Then comes monospace text printing using the smallest 6 by 8 pixels font . You can print substantial amount of text with this font but it's really small. Next are proportional fonts 16 pixels in height. 24 pixels in height and 32 pixels in height. This is a simple 2D geometry rendering test. And finally there are images from SD card. You can estimate the quality of this IPS display. Please look at viewing angles. Yes, there is some brightness falloff at extreme viewing angles but there is no color inversion and the screen stays readable. This is the quality this display can provide. Here is the same test sequence on the square display. Full refresh time is 321 ms on this display, so you won't get comfortable refresh rate redrawing the whole screen every time. * DMA transfer may significantly increase refresh rate but requires additional buffer in MCU RAM. We can check backlight uniformity on white fill. You can notice some darkening on the lower edge of the this screen, too. Looks like backlight LEDs are there. Text printing with backlight dimming. This display can show a large amount of text when smallest font is used. Bigger fonts. And the largest one, 32 pixels per character height. Same 2D geometry test. You can estimate the resolution - it's much higher in comparison with rectangular display. And finally some real life images. Same wide viewing angles. There is some brightness falloff at extreme angles but colors are not faded or inverted and the image is very distinguishable. To get the idea of overall display brightness let's compare it to Xiaomi Redmi Note 4. Auto brightness is turned off on the smartphone. Let's try to set the phone screen brightness as close as possible to our display. I think the brightness is matching well on 50-45% of phone screen brightness. Anyways it's just some rough reference point in absence of more precise measuring methods. Power consumption of the square display on maximum brightness is about 31 mA. Power consumption of the rectangular display on maximum brightness is about 17.5 mA. Well, friends, as you can see these display have some issues but they are first models of IPS screens for DIY electronics on the market. They are widely available, cheap and well documented. But I hope that more models will appear in the nearest future. That's all for today, thank you for watching the video. As usually - good luck! Bye!. 240x240 Sitronix ST7789 based display under microscope 160x80 Sitronix ST7735 based display under microscope
Info
Channel: Электроника в объективе
Views: 218,902
Rating: undefined out of 5
Keywords: IPS, ips display, дисплей, st7789, st7735, spi, ips дисплей, подключение дисплея к микроконтроллеру, ips 240x240, ips 160x80, color display, качественный дисплей, отличный дисплей
Id: PUV9_OdMcCA
Channel Id: undefined
Length: 13min 20sec (800 seconds)
Published: Wed Oct 17 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.