<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Using of SPI to interface with Epson S1D13781 graphics controller</title><link>https://community.element14.com/technologies/embedded/w/documents/7196/using-of-spi-to-interface-with-epson-s1d13781-graphics-controller</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Using of SPI to interface with Epson S1D13781 graphics controller</title><link>https://community.element14.com/technologies/embedded/w/documents/7196/using-of-spi-to-interface-with-epson-s1d13781-graphics-controller</link><pubDate>Thu, 07 Oct 2021 06:02:48 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:0413c215-49cb-4443-ad96-4f2dba8b4409</guid><dc:creator>Former Member</dc:creator><comments>https://community.element14.com/technologies/embedded/w/documents/7196/using-of-spi-to-interface-with-epson-s1d13781-graphics-controller#comments</comments><description>Current Revision posted to Documents by Former Member on 10/7/2021 6:02:48 AM&lt;br /&gt;
&lt;div class="" style="margin:0;"&gt;Often the graphics controller is connected to MCU via the parallel interface. This kind of connection provides a very fast access to the frame buffer. Sometimes the rendering is done so quickly that the double buffering (virtual frame) is not required. But the parallel interface may not be&amp;nbsp; acceptable for the low-cost systems on account of the following reasons:&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;ol start="1" style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;Large signals quantity. Usually graphics controllers support 8 or 16 bits data bus. Additionally 18-20 lines may be required for the address bus if the direct addressing mode is used.&lt;/li&gt;&lt;li class="MsoNormal"&gt;The limited number of MCUs has the external parallel bus peripheral available.&lt;/li&gt;&lt;/ol&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;In opposite to parallel interface the serial interface is simple, it has just 4 wires. Almost any MCU has an SPI module. The cheap, low pin count MCUs can be used. The graphics application transfers a big amount of data. The SPI is significantly slower than parallel interface and the rendering process, flickering and others artifacts become visible on the screen. To decide this problem the double buffering has to be used.&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;span&gt;Let&amp;#39;s consider 2 types of the double buffering:&lt;/span&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;ol start="1" style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;&lt;strong&gt;Virtual Buffer.&lt;/strong&gt; In the system with virtual buffer the one buffer is hidden and the second buffer is displayed on LCD. The graphics library draws in the hidden buffer then copies updated area or the whole buffer into the second visible buffer. Usually, the copy process is much faster than the graphics rendering. In this case, the use of such hidden buffer hides the drawing flicker and artifacts. &lt;/li&gt;&lt;/ol&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;ol start="2" style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;&lt;strong&gt;Buffers Switching.&lt;/strong&gt; The system has buffers with the same images and switches them after update. At first the image is updated in the hidden buffer, then this buffer is switched to be visible and the graphics library makes the same change in the second buffer. So the graphics library must maintain two same screens all the time and copy the modified part or the whole content between buffers (from visible to hidden).&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;&lt;a class="jive-link-external-small" href="http://www.colibrigraphics.com/" rel="nofollow ugc noopener" target="_blank"&gt;Colibri Graphics embedded GUI library&lt;/a&gt; supports all double buffering methods described above.&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;When the visible buffer is switched or updated at the arbitrary time then the situation, when one half of screen displays the first buffer and the second half shows the data from the second buffer, is possible.This effect is known as tearing. Usually the buffer switching should be synchronized with the vertical LCD beam in order to avoid tearing.&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;The &lt;strong&gt;Virtual Buffer&lt;/strong&gt; method is simple but requires a very fast copy operation between buffers. In case of the low speed the &lt;strong&gt;Buffer Switching&lt;/strong&gt; methods can be used.&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;Epson S1D13781 graphics controller has a unique set of features to support SPI operation:&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;ol start="1" style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;It has a large memory to allocate two buffers inside the controller. The buffers can have RGB 5:6:5 format for QVGA (320x240) resolution and 8 bit per pixel format for WQVGA (480x272) resolution. &lt;/li&gt;&lt;li class="MsoNormal"&gt;The S1D13781 has a built-in &lt;strong&gt;graphics accelerator&lt;/strong&gt;. The memory copy operation for the double buffering can be performed by the graphics controller without involving of the MCU. This frees the MCU resources for other tasks. The cheap MCU with lower MIPS can be used. Also the accelerated copy operation is very fast. In this situation the &lt;strong&gt;Virtual Buffer&lt;/strong&gt; double buffering method can be used even for the SPI connection. &lt;/li&gt;&lt;/ol&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;&lt;a class="jive-link-external-small" href="http://www.colibrigraphics.com/" rel="nofollow ugc noopener" target="_blank"&gt;Colibri Graphics library&lt;/a&gt; supports Epson S1D13781 controller. It has a unique features set for the low-cost systems using SPI:&lt;/div&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;ol start="1" style="margin-top:0in;"&gt;&lt;li class="MsoNormal"&gt;Colibri Graphics Embedded GUI library works with all double buffering methods described above.&lt;/li&gt;&lt;li class="MsoNormal"&gt;The library has an extensive 8bit per pixel support. The palettes can be optimized for several images; intermediate palettes with indexes of another top palette can be used; the images can be adjusted for the selected palette. This allows the application to use S1D13781 via SPI for WQVGA resolution LCDs.&lt;/li&gt;&lt;li class="MsoNormal"&gt;Colibri Graphics hardware has an SPI option for S1D13781 controller.&lt;/li&gt;&lt;li class="MsoNormal"&gt;The library code is written in ANSI C, has a very small footprint (less than 2Kbytes in RAM and 30Kbytes in ROM). The code porting to different compiler or MCU is easy.&lt;/li&gt;&lt;li class="MsoNormal"&gt;Free extensive customer support.&lt;/li&gt;&lt;/ol&gt;&lt;div class="" style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;Anton Alkhim,&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;&lt;strong&gt;Colibri Software, 2010&lt;/strong&gt;&lt;/div&gt;&lt;div class="" style="margin:0;"&gt;&lt;a class="jive-link-external-small" href="http://www.colibrigraphics.com/" rel="nofollow ugc noopener" target="_blank"&gt;http://www.colibrigraphics.com&lt;/a&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: gui, frame_buffer, graphics_library, double_buffering, s1d13781, embedded_gui&lt;/div&gt;
</description></item></channel></rss>