<?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>(nRF24le1e) Could you give me example about I2C ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/25875/nrf24le1e-could-you-give-me-example-about-i2c</link><description>Hello, 
 I am new in this platform. Few days ago, my boss give me a nRFgo Motherboard. He want me to write a program that nRF24le1e can read/write data from sensor via I2C then show to LCD. I want I2C example or anything that can help me finish this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 17 Jan 2019 13:00:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/25875/nrf24le1e-could-you-give-me-example-about-i2c" /><item><title>RE: (nRF24le1e) Could you give me example about I2C ?</title><link>https://devzone.nordicsemi.com/thread/166233?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 13:00:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7540dbba-6a76-4af2-bdf4-f0dbab30c205</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Farzad,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(just FYI, SDK v2.3 is very old SDK and nRF24 is not recommended for new design)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The delay added in lcd_on() and lcd_init() was barely for the particular LCD that need some time to ramp-up , it&amp;#39;s not related to our I2C on the chip.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It should work even without the delay.&lt;/p&gt;
&lt;p&gt;What&amp;#39;s exactly the issue you had if you have lower than 500ms ?&lt;/p&gt;
&lt;p&gt;( I would suggest to create a new case&amp;nbsp;as this is not really related to the OP )&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (nRF24le1e) Could you give me example about I2C ?</title><link>https://devzone.nordicsemi.com/thread/166127?ContentTypeID=1</link><pubDate>Thu, 17 Jan 2019 06:24:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b606de3-43c6-4486-aa0a-e1829bd53478</guid><dc:creator>farzad.panahi</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was looking at the lib_display.c file in the nRFGo SDK 2.3 to see how the I2C is set up and noticed that there are 10ms delays before and after each hw_w2_write. Also there are a few delays in the init.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void lcd_on(void)
{
  uint8_t buffer[2];

  delay_ms(10);
  buffer[0] = FUNC_SET; 
  buffer[1] = 0x0C;                               // Display ON
  hal_w2_write(LCD_ADDR, &amp;amp;buffer[0], 2);
  delay_ms(10);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void lcd_init(void)
{ 
  hal_w2_configure_master(HAL_W2_400KHZ);
  delay_us(100);
                      
  lcd_set_instruction(0x38);                      // Function set
  lcd_set_instruction(0x39);                      // Choose two-line mode
  lcd_set_instruction(0x14);                      // Internal OSC frequency
  lcd_set_contrast(LCD_CONTRAST_HIGH);            // Contrast set (low byte)
  lcd_set_instruction(0x5F);                      // Power/ICON control/
                                                  // Contrast set (high byte)
  lcd_set_instruction(0x6A);                      // Follower control
  delay_ms(200);

  lcd_on();                                       // Display ON
  lcd_clear();                                    // Clear display
  lcd_set_instruction(0x06);                      // Entry mode set    
}    &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Are these delays necessary? Is there a way to avoid them?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We have a situation where we need to power-on nRF24LE1 and quickly send commands over I2C. But it seems like that the I2C is not stable right away when the nRF24LE1 is powered on. We need to add 500ms delay for it to become stable! But we cannot afford to have such a long delay in our application. Is this expected behaviour? Is there a workaround for this?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Farzad&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (nRF24le1e) Could you give me example about I2C ?</title><link>https://devzone.nordicsemi.com/thread/101911?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2017 12:53:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:107c1f32-d909-459c-a6db-53b8c9827def</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Which LCD you are going to use ? If it&amp;#39;s the LCD that can be plugged on the nRFGo Motherboard, you can find the library and example (display_joystick_example) in the &lt;a href="http://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-SDK/(language)/eng-GB"&gt;nRFGo SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to interface with other I2C peripheral, you can have a look at my examples of I2C master and slave here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7563.I2C_5F00_Master.rar"&gt;I2C_Master.rar&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/6521.I2C_5F00_Slave.rar"&gt;I2C_Slave.rar&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>