<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4231/porting-ssd1306-for-oled</link><description>I need to port ssd1306 library for oled to nrf51822. 
 so i tested following code. but it&amp;#39;s not worked. 
 main(){
 if (!twi_master_init())
 {
 return false;
 }
 ssd1306_init();
}
static bool ssd1306_lcd_set_instruction(uint8_t instr)
{
 nrf_delay_us</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 30 Oct 2014 08:49:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4231/porting-ssd1306-for-oled" /><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15111?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 08:49:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93f0100d-60c4-4995-8f70-c2a13a212d5f</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Please accept the answer if it worked. Create a completely new question if you have a new question. We want to have it this way so it is easier for other to find the answer to a specific problem if they have the same problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15109?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 02:33:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46aa910d-a967-486a-8bda-3b4a9b33e329</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;I&amp;#39;m porting below code. but the font file is so large.
&lt;a href="https://bitbucket.org/tinusaur/ssd1306xled/src/d467de1d216d18532ef38ccaa85f0e629f561ec2/ssd1306xled/?at=default"&gt;bitbucket.org/.../&lt;/a&gt;
and I don&amp;#39;t know how I can. T_T Please advice.
After I success with I2C, I will try SPI. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15108?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 02:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2eab199f-6154-48d5-8697-78f7d686e30c</guid><dc:creator>Clem Taylor</dc:creator><description>&lt;p&gt;Currently I&amp;#39;m using the SSD1306 in the vertical addressing mode, this seems to be the easiest mode to use, The hardware horizontal scrolling is farily useless. If you only have a 128x32 display you can do vertical scrolling by writing to the start line register. However the display I&amp;#39;m using for prototyping has a rather nasty bug: &lt;a href="http://youtu.be/nIlNApuFGXo"&gt;http://youtu.be/nIlNApuFGXo&lt;/a&gt; Writing the entire frame every frametime works just fine: &lt;a href="http://youtu.be/KM-mhbYWSJ8"&gt;http://youtu.be/KM-mhbYWSJ8&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The SSD1306 4 wire SPI interface has a command/data pin, chip select, clock and MOSI pins. I do one command transaction to configure the address mode, then a data transaction to clock the entire 512 byte frame buffer (128x32x1bpp) and then an optional transaction to update the start line (to reduce potential tearing). Once I queue up the transactions all the data motion and setting the cs/dc lines is handled by the SPI interrupt handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15114?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 01:44:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae1c8de1-bb94-4a5e-9f36-8c980fb29e6e</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;It worked. Can I ask another question?? how can I draw bitmap?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15107?ContentTypeID=1</link><pubDate>Thu, 30 Oct 2014 01:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d61804c1-24ee-4010-b38d-68f02a635210</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;Thank Clem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15106?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 23:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d3092ba-567f-4b97-87fa-18aa292f1580</guid><dc:creator>Clem Taylor</dc:creator><description>&lt;p&gt;If your hardware isn&amp;#39;t fixed yet, save yourself some pain and use the SSD1306 based display with SPI not I2C. The SPI interface is so much faster and requires much less CPU time to feed.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using a SSD1306 based display with the SPI interface and I&amp;#39;ve been very happy with it (except for what seems to be a chip bug in the handling of writes to the start line register).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15113?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 15:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4503070-3b63-4772-87ec-ea09850c3cfa</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;In this function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;return twi_master_transfer(SSD1306_SA &amp;lt;&amp;lt; 1, data_buffer, 2, TWI_ISSUE_STOP);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;you are shifting the address 1 bit left. In the SSD1306 documentation, the address should be in this form:&lt;/p&gt;
&lt;p&gt;0 1 1 1 1 0 SA0 R/W&lt;/p&gt;
&lt;p&gt;Which is &lt;strong&gt;0x3C&lt;/strong&gt; shifted one bit left. (As long as SA0 and R/W is 0)&lt;/p&gt;
&lt;p&gt;You can set SSD1306_SA to be 0x3C, or write 0x78 directly like this, as Nenik suggests:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;return twi_master_transfer(0x78, data_buffer, 2, TWI_ISSUE_STOP);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15112?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 11:52:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2022efc-4726-4057-bb8e-01b32f8af25c</guid><dc:creator>Takatoshi Nao</dc:creator><description>&lt;p&gt;hello nenik,
SSD1306_SA is 0x78. but it&amp;#39;s not worked. can you advice to me? Do I have to use 0x3C???!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Porting SSD1306 for Oled</title><link>https://devzone.nordicsemi.com/thread/15110?ContentTypeID=1</link><pubDate>Wed, 29 Oct 2014 07:00:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b80842-516d-4724-b4a4-c52ae5ff065e</guid><dc:creator>Nenik</dc:creator><description>&lt;p&gt;What is your SSD1306_SA?
0x3C?
I use very similar code and SSD1306 based display and it works well for me, but I use 0x78 directly (the shift might have been already factored in the datasheet, IIRC)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>