<?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>Kinetis MicrocontrollersのトピックRe: Interfacing SSD1306 with SPI bus on KL43Z</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448741#M26569</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've not worked with the SSD1309, but I did manage to get a project working with the SSD1289, and also the ILI9341.&amp;nbsp; Here's a few suggestions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If you are using SPI to communicate, I HIGHLY recommend using the DMA controller to manage your reads/writes as I think the fastest you can communicate to the TFT controller using SPI is around 10 MHz clock rate.&lt;/P&gt;&lt;P&gt;2. The other problem I ran into was not having enough RAM to hold an entire frame in memory with a 320x240 at 16 bit color depth since the L series Kinetis only have max of 32 kB.&amp;nbsp; I ended up using as much RAM as I could to hold up to 1/6th or 1/5th of a frame in memory and had to manage reloading the DMA transfer for larger images or screen updates.&amp;nbsp; It might be that for a large bitmap you just use the DMA to transfer it to the TFT controller directly from flash.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; You definitely need to get your graphics primitive functions working and then you can build on top of that.&amp;nbsp; I think I had the best inspiration from the Processor Expert graphic display components that you can find on mcuoneclipse.com (a GREAT site for lots of helpful info BTW, I owe a lot of what I've learned about Kinetis MCU's to Erich Styger).&amp;nbsp; I will mention that some of the graphics primitives functions there need to be optimized a little bit to work with the KL family due to limited RAM and speed.&amp;nbsp; Opening a window to draw a single pixel, for instance, just doesn't work from a performance standpoint, so you may need to be a little creative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Travis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Apr 2016 15:53:24 GMT</pubDate>
    <dc:creator>travis_l</dc:creator>
    <dc:date>2016-04-06T15:53:24Z</dc:date>
    <item>
      <title>Interfacing SSD1306 with SPI bus on KL43Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448739#M26567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello freescale community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a KL43Z board. So far I have done some hello world (and similar) programs with no problems.&lt;/P&gt;&lt;P&gt;Now I want to connect my SSD1306 LCD to Kinetis board. After figuring out the pinout for this connection (using SPI1 from the Arduino-compatible connector), currently I am completely stuck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was looking for any tutorial that will show me how to configure (in Processor Expert(?)) and program SPI bus, so that I can display anything on the mentioned LCD. Should I use Processor Expert or write it from scratch?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To make things easier - I downloaded the popular u8glib library, which I know from Arduino. Unfortunately I have no idea on how to adapt it for the MCU present on Kinetis board. Has anybody ported that library to any Kinetis board? The LPC Cortex-M0 configuration which is the only one available in it - is completely different from this board and gives dozens of errors in KDS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for any advice!&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 22:29:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448739#M26567</guid>
      <dc:creator>piotrcerba</dc:creator>
      <dc:date>2015-08-18T22:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing SSD1306 with SPI bus on KL43Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448740#M26568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piotr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately we don't have a library to work with the SSD1306 LCD, but you can find several SPI driver examples in Kinetis SDK that can help you create your LCD driver:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52778iCF3A8D1495633F4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kinetis SDK can be downloaded from the link below, choose the Kinetis SDK 1.2 Mainline which is the newest version and supports the KL43Z MCUs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KINETIS-SDK" title="http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=KINETIS-SDK"&gt;Software Development Kit for Kinetis MCUs|Freescale&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also use Processor Expert with Kinetis SDK, information about the fsl_spi component properties, methods and events can be found on the help of the component: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/52780i3BD29B3FBB9164E7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Carlos Mendoza&lt;/P&gt;&lt;P&gt;Technical Support Engineer&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 17:13:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448740#M26568</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2015-08-24T17:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing SSD1306 with SPI bus on KL43Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448741#M26569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've not worked with the SSD1309, but I did manage to get a project working with the SSD1289, and also the ILI9341.&amp;nbsp; Here's a few suggestions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If you are using SPI to communicate, I HIGHLY recommend using the DMA controller to manage your reads/writes as I think the fastest you can communicate to the TFT controller using SPI is around 10 MHz clock rate.&lt;/P&gt;&lt;P&gt;2. The other problem I ran into was not having enough RAM to hold an entire frame in memory with a 320x240 at 16 bit color depth since the L series Kinetis only have max of 32 kB.&amp;nbsp; I ended up using as much RAM as I could to hold up to 1/6th or 1/5th of a frame in memory and had to manage reloading the DMA transfer for larger images or screen updates.&amp;nbsp; It might be that for a large bitmap you just use the DMA to transfer it to the TFT controller directly from flash.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; You definitely need to get your graphics primitive functions working and then you can build on top of that.&amp;nbsp; I think I had the best inspiration from the Processor Expert graphic display components that you can find on mcuoneclipse.com (a GREAT site for lots of helpful info BTW, I owe a lot of what I've learned about Kinetis MCU's to Erich Styger).&amp;nbsp; I will mention that some of the graphics primitives functions there need to be optimized a little bit to work with the KL family due to limited RAM and speed.&amp;nbsp; Opening a window to draw a single pixel, for instance, just doesn't work from a performance standpoint, so you may need to be a little creative.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Travis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 15:53:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448741#M26569</guid>
      <dc:creator>travis_l</dc:creator>
      <dc:date>2016-04-06T15:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Interfacing SSD1306 with SPI bus on KL43Z</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448742#M26570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have indeed set up DMA to SSD3105 (embedded on my 128x64 OLED display cable).&amp;nbsp; I use two chip-selects, one of which is D/!C, and assert one or both 'as necessary'.&amp;nbsp; Those basics are in my post in:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/314019#355926" title="https://community.freescale.com/thread/314019#355926"&gt;https://community.freescale.com/thread/314019#355926&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I just let my 'timer tick' enable the block-dump of the entire command- and data-array into the chip every 20ms, and let the DMA do all the work.&amp;nbsp; This array is set up as 32bits, but I only use the 'bottom 8' of each such long-word for screen data.&amp;nbsp; The upper half is SPI-controls, and since the SSD is a 'byte' device each transfer is 8 bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have line-draw and bit-blt graphics routines to fill this monochrome bitmap using highly-efficient bit-banding operations as on K processors -- email me and I will supply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I see you call out a KL processor, so my 'K' code is not very helpful in any direct way -- both DMA and SPI hardware are significantly different.&amp;nbsp; And instead of bit-banding there is the BME - that would require some changes&amp;nbsp; to my drawing code too...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2016 21:45:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interfacing-SSD1306-with-SPI-bus-on-KL43Z/m-p/448742#M26570</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-04-06T21:45:15Z</dc:date>
    </item>
  </channel>
</rss>

