<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC Microcontrollers中的主题 Re: emWin &amp; SHARP LS027B7DH01 LCD</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515222#M1075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Martin84 on Tue Jul 23 03:59:56 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there's a register where you can swap red and blue. For the 18xx it is the "LPC_LCD-&amp;gt;CTRL = (1 &amp;lt;&amp;lt; BGR)". For emWin you should look in the manual for "BGR". I think there is a "M" within the driver.For example GUICC_565 and GUICC_M565.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the LCDconf.c at this line: #define COLOR_CONVERSION&amp;nbsp; GUICC_M565&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 17:15:30 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T17:15:30Z</dc:date>
    <item>
      <title>emWin &amp; SHARP LS027B7DH01 LCD</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515221#M1074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Andrew on Tue Jul 23 01:33:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I am using the monochrome low power LCD in one of my projects. I implemented a frame buffer to which I can write (draw pixels) and which I can flush to the LCD through SPI interface &amp;amp; DMA and it works fine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I decided to try emWin GUI library, because it offers a lot of widgets and other cool stuff. Modified GUIConf &amp;amp; LCDConf configuration files to use GUIDRV_LIN_1 driver and GUICC_1 colour conversion, changed resolution and other settings. It compiled and runs fine. The only problem I have is bits order. Because the display is connected through the LPC1758 SSP interface which transmits MSB (most significant bit) first and the display is expecting LSB first I organised the frame buffer in the way where bits of all bytes swapped. So that I don't need to do swapping every time before I flush the buffer and my SetPixel is aware of that and handles it properly. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; The questions is how to configure the GUIDRV_LIN_1 driver or emWin so that they write to the frame buffer properly? I found in the documentation LCD_ENDIAN_BIG setting, changed it from 0 to 1 but it didn't make any difference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; It seems to me that I need to write my own driver to handle it. They mention GUIDRV_Template in the emWin documentation but I have only the header file in the library I downloaded from the site. Does any one know if according to the licence agreement we are allowed to implement our own drivers? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; If we are, where can I find more information about the driver development on emWin?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bits order I need&amp;nbsp;&amp;nbsp; 7 6 5 4 3 2 1 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 7 6 5 4 3 2 1 0&amp;nbsp; ... ... ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bits order emWin&amp;nbsp;&amp;nbsp; 0 1 2 3 4 5 6 7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0 1 2 3 4 5 6 7&amp;nbsp; ... ... ..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Andrew&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:15:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515221#M1074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: emWin &amp; SHARP LS027B7DH01 LCD</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515222#M1075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Martin84 on Tue Jul 23 03:59:56 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi there's a register where you can swap red and blue. For the 18xx it is the "LPC_LCD-&amp;gt;CTRL = (1 &amp;lt;&amp;lt; BGR)". For emWin you should look in the manual for "BGR". I think there is a "M" within the driver.For example GUICC_565 and GUICC_M565.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the LCDconf.c at this line: #define COLOR_CONVERSION&amp;nbsp; GUICC_M565&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515222#M1075</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: emWin &amp; SHARP LS027B7DH01 LCD</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515223#M1076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Andrew on Tue Jul 23 23:54:28 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The display I am using is a monochrome LCD. So, basically each pixel is represented by one bit such as: 0 - is white colour, 1 is black colour. At the same time I am using LPC1758 MCU which doesn't have a LCD controller. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you imagine a 16x2 display, when the screen is cleared (all pixels are white) your memory frame buffer will look like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 00000000 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 00000000 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, if we want to set a (black colour) pixel at position x = 0, y = 1, the frame buffer will look as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 00000000 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 10000000 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need instead is, as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 00000000 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 00000001 00000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, order of bits in any given byte in the frame buffer are swapped.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:15:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/emWin-SHARP-LS027B7DH01-LCD/m-p/515223#M1076</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:15:31Z</dc:date>
    </item>
  </channel>
</rss>

