<?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>RTC with DS1307</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16861/rtc-with-ds1307</link><description>For my application I use a RTC. For now without SD and based on SDK 11.0. Later I will implement it in an application with BLE. My device is a Raytac module with a nRF52832 on it. The module is connected with the RTC DS1307. 
 I think that I had success</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 02 Sep 2017 05:30:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16861/rtc-with-ds1307" /><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64563?ContentTypeID=1</link><pubDate>Sat, 02 Sep 2017 05:30:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c324e1c-ca29-45cc-bad5-c93f12ba686e</guid><dc:creator>f1rew4ll</dc:creator><description>&lt;p&gt;I have the same problem. Once I add a ds1307RTC.h library into my code then I can read the time on the serial port but ble stops advertising and is not visible by device. Once I comment  that library then obviously cannot get the time but ble is discoverable.. Any solutions?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64566?ContentTypeID=1</link><pubDate>Fri, 16 Jun 2017 08:36:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8f854e0c-23a9-4b9d-ae5b-4d1830ea9efa</guid><dc:creator>srijan12</dc:creator><description>&lt;p&gt;This works in blocking mode. The read function gives zero once in a while, maybe because I am not checking the availability of twi.&lt;/p&gt;
&lt;p&gt;void twiWriteData(uint8_t regVal, uint8_t dataVal)
{
uint8_t reg[2] = {0,0};&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (regVal == 100)
{
	reg[0] = 0;
	err_code = nrf_drv_twi_tx(&amp;amp;m_twi_driver, DS1307_ADDR, reg, 1, 0);		
}

reg[0] = regVal;
reg[1] = dataVal;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;err_code = nrf_drv_twi_tx(&amp;amp;m_twi_driver, DS1307_ADDR, reg, 2, 0);
}&lt;/p&gt;
&lt;p&gt;uint8_t twiReadData(uint8_t regVal)
{
uint8_t myVal = 0;
err_code = nrf_drv_twi_tx(&amp;amp;m_twi_driver, DS1307_ADDR, &amp;amp;regVal, 1, 1);&lt;br /&gt;
APP_ERROR_CHECK(err_code);&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (NRF_SUCCESS == err_code)
{
	err_code = nrf_drv_twi_rx(&amp;amp;m_twi_driver, DS1307_ADDR, &amp;amp;myVal, 1);
	APP_ERROR_CHECK(err_code);
}

//twiWriteData(100,0);		// generate Stop condition

return myVal;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;You need to write 0 to register 0 to kickstart the IC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64567?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 09:54:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:894cf3f6-ec1e-4539-bae5-fc1a09f7f9d9</guid><dc:creator>Jax</dc:creator><description>&lt;p&gt;Not yet, still not working&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64565?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 09:34:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ad38d7f-a340-4b10-a87b-c8bcc8fbffb8</guid><dc:creator>srijan12</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Same here. Did you make it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64564?ContentTypeID=1</link><pubDate>Mon, 10 Apr 2017 12:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:543067c4-0257-4a2e-af27-069fec8701fb</guid><dc:creator>Jax</dc:creator><description>&lt;p&gt;Hi
I also can not Read from ds1307.
Could you please share how you did it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64562?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 14:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9750a2c7-321a-4fa3-9231-644c2863b8e5</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;I got it. The adress for the slave is always 0x68. I assumed the the last bit(R/W) belongs to the 7 bits of the adress. So for Read I had 0x69 as slave adress. Now I will get the right data back. Thank you for the support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64561?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 14:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:551f23de-c950-4052-8a4b-267968ba2d60</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Have you applied correct power to both Vcc and Vbat? In order to enable clock write zero to Seconds(address 0x00), looks like on applying power it is disabled by default&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64560?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 13:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e09f5d3-0e83-4708-a075-cfdcea64ec63</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;Now I will get only one byte data back from the DS1307. And its always 0x00. I think that the oscillator is disabled. But I have no success to enable it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64559?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 12:39:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e0bf471-46ea-4650-af99-f41de07fdc46</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Yes, exactly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64558?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 12:27:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45180094-abe6-4559-842e-1606091dcd9c</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;How do you mean I dont need a stop condition after writing adress? You are talking about figure 6 right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64556?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 12:22:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56c2d2d1-838e-4dba-bb01-4b381393931a</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry, I&amp;#39;m using different SDK and look like they changed name of the parameter. Basically you don&amp;#39;t need to issue stop condition after writing address of register. Then issue stop after reading.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64557?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 11:30:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dbc14c9f-deab-4e58-9b61-c43457b00d3e</guid><dc:creator>Inspectron</dc:creator><description>&lt;p&gt;nrf_drv_twi_tx(nrf_drv_twi_t const * p_instance,uint8_t address,uint8_t const * p_data,uint8_t length, bool            no_stop)&lt;/p&gt;
&lt;p&gt;So if I understand it right no_stop = false -&amp;gt; This will send a stop. And no_stop = true -&amp;gt; would send no stop. I have this from the TWI_sensor example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: RTC with DS1307</title><link>https://devzone.nordicsemi.com/thread/64555?ContentTypeID=1</link><pubDate>Wed, 05 Oct 2016 09:25:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d332d95-99bc-483a-a142-547016e12c58</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Shell it be &lt;code&gt;nrf_drv_twi_tx(&amp;amp;m_twi_driver, SLAVE_ADRESSE_W, reg, 1, **true**);&lt;/code&gt;? And you need to read one register at a time or read sequentially 6 registers from Seconds to Month. In any case &amp;#39;reg&amp;#39; should be reg[1] with the address to read and only one nrf_drv_twi_rx for each tx reading as many sequential bytes as you need.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>