<?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>HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20609/htu21d-no-response-over-i2c</link><description>Hi, 
 I am using the example code supplied by the blog for reading humidity from the HTU21D sensor using TWI . My humidity and temperature readings are constant and never change. They appear as: 
 Humidity: -6.0
Temperature: -46.85 
 Based on the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Mar 2017 17:59:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20609/htu21d-no-response-over-i2c" /><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80323?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 17:59:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71e682f2-d498-4d7b-acf0-6550ed3fa295</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Well, after I downloaded SDK 13.0 and migrated my project to the newest TWI_sensor example, and then &lt;code&gt;nrf_delay_ms()&lt;/code&gt; started working again. So, I added 500 ms delays after each use of &lt;code&gt;nrf_drv_twi_tx&lt;/code&gt; and &lt;code&gt;nrf_drv_twi_rx&lt;/code&gt;, as well as a 2 second delay in the main function. As a result, the sensor finally prints good values at the correct time intervals!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80319?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 17:39:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dfd0461-d6fa-4087-857a-b9a6935d536e</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Hi Hung, I have downloaded SDK 13.0 and the delays are actually working now! Still trying to get this sensor to print good values though. The work continues!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80321?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 15:23:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba54e62a-c1b6-486a-96f0-5db0dfdf3e7e</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Have you tried something else , not 5000 ? Have you tried on other board ? Do you have any nRF52 for testing?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80307?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 13:47:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:424471db-0cd7-4e96-885f-fb4d3a8c0c1d</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;That is the blinky example I used, which I described above. Using nrf_delay_ms(5000) makes LD5 blink very rapidly. It&amp;#39;s good to know there&amp;#39;s no maximum delay, that must mean something is going wrong in nrf_delay.h...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80320?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 13:00:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eae559e-1aab-403a-82a2-e4203a5d277d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please try to test with our blinky example in \examples\peripheral\blinky\pca10040&lt;br /&gt;
Please try to change the nrf_delay_ms() to delay for 5000ms to test. You should see the LED change every 5 seconds.&lt;/p&gt;
&lt;p&gt;The maximum delay time for that function should be up to 71 minute as it use uint32_t for the delay time in us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80306?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 21:34:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f16a4dc2-fc9d-4dd5-b381-a090de671704</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;For my blinky example in SDK12.2, LD5 blinks every 1 second when using nrf_delay_ms(1000). However, using nrf_delay_ms(5000) makes LD5 blink very rapidly. Does nrf_delay_ms() have a maximum delay limit?&lt;/p&gt;
&lt;p&gt;Also, when I was stepping through my code for the sensor, I noticed that the nrf_delay_ms() commands will go through the same number of NOP lines no matter the time value specified. Do you think this is the problem? If so, is there something wrong with my nrf_delay.h file? I have included my nrf_delay.h file above if you&amp;#39;d be willing to take a look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80318?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2017 08:40:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d05b5f3b-da9b-4046-bec0-1dde712a83c2</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You may want to check if the  nrf_delay_ms() delay actually works. Try to test with the blinky example. Simply toggle an LED and check if it blink the correct interval.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80322?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2017 21:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cba939d-d34d-4f53-9f2c-12f24a41c172</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Hi Hung, I have added long delays in my code, for example nrf_delay_ms(10000) in between reading and writing to the register and printing to the screen in Segger RTT Viewer. When I program the nRF52 and view its output in RTT Viewer, the temperature is printed very rapidly as if the delays are not happening. I wanted to print a value every 10 seconds, but instead the program prints every 1 second or faster. If I could get the code to execute slower then I believe it would work. Do you know how I can make the delays execute? Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80317?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 08:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ea2a901-af50-4ead-a9cb-a003f7ffe6cc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I assume writing and reading to the user register also work when you are in normal mode not debug mode ?
I&amp;#39;m running out of idea why it wouldn&amp;#39;t work. I would suggest to use the logic analyzer to check the difference between what is transferred when in normal mode and debug mode. And maybe increate the delay to say 500ms for example. I&amp;#39;m not sure if your sensor requires any delay between command to get correct result or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80315?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2017 15:07:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d2fc2e3-6060-47f8-9841-98c6f11e47b1</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;It looks like the sensor is responding to my commands so that&amp;#39;s good. I have added &lt;code&gt;nrf_delay_ms(50);&lt;/code&gt; between every line of code in my main function and in my sensor functions between &lt;code&gt;nrf_drv_twi_tx()&lt;/code&gt; and &lt;code&gt;nrf_drv_twi_rx()&lt;/code&gt; especially, but I am still receiving the incorrect values. Only when I am in debugging mode stepping through my code do I receive a realistic value from the sensor. Can you suggest anything else? It seems like I need to change something in the Nordic libraries I am using since I have tried everything else in my main.c file. Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80311?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2017 10:25:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbfb921b-af76-4a76-86df-60b25745dafa</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I suggested to read the user register, to make sure the I2C communication is done properly and the chip is up and alive.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80309?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 13:56:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f47d5a9b-c341-4912-aa99-a1966d352b96</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;I will look into the timing issue. I guess I do not understand why reading the user register first is important?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80310?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 13:19:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2865d941-4317-4578-9099-61e0331a90ee</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;It could be an timing issue. try putting some delay between your commands.&lt;/p&gt;
&lt;p&gt;As I suggested, try to read the user register first before you try to acquire data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80314?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 00:50:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad929b43-1e54-4abb-b8ad-85ee74499fb7</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;Finally, I got some good values to print! However, they only print when I&amp;#39;m in debugging mode in Keil, garbage values otherwise! Any idea how to fix this? Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80313?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2017 17:19:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94afc280-b7f8-4b8f-a0be-b8146fd3dc2c</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;I have edited my question to include images of my circuit and the sensor. I will try to test the read and write to the user register and see what happens. Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80312?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2017 12:24:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09c75b6c-ef65-41b5-b326-dde79eb5aad7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I would suggest to test by trying to read (and then write) the user register using 0xE7 and 0xE6 command, before you test with collecting actual data. You may want to update a photo of your setup and the schematic.
The pull-ups are needed, you can use internal pull up on the I2C pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80308?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2017 12:02:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cdc006b-796c-401f-924e-25d5926db5e0</guid><dc:creator>Levi</dc:creator><description>&lt;p&gt;I have added two 4.7 kOhm pull-up resistors, but still achieving the same results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HTU21D no response over I2C</title><link>https://devzone.nordicsemi.com/thread/80316?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2017 10:39:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a5636ac-1adb-421e-9ed7-632e5a8accf0</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;I²C pretty much requires you to use 1k-10k pullup resistors on both SCL and SDA line. Check connectivity and voltages.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>