<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://wiki.ee.uct.ac.za/index.php?action=history&amp;feed=atom&amp;title=RaspberryPi%3ARTC</id>
	<title>RaspberryPi:RTC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ee.uct.ac.za/index.php?action=history&amp;feed=atom&amp;title=RaspberryPi%3ARTC"/>
	<link rel="alternate" type="text/html" href="http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;action=history"/>
	<updated>2026-04-23T21:54:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=101&amp;oldid=prev</id>
		<title>CRNKEE002: /* Test the Software */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=101&amp;oldid=prev"/>
		<updated>2020-02-06T10:38:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Test the Software&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:38, 6 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l104&quot; &gt;Line 104:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 104:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check the various times the Pi has access to:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check the various times the Pi has access to:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;$ timedatectl&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;$ timedatectl&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Depending on whether or not you’ve connected to the internet, your results can look quite varied:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;p&amp;gt;Depending on whether or not you’ve connected to the internet, your results can look quite varied:&amp;lt;/p&amp;gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;li&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;.5&lt;/del&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;span&lt;/del&gt;&amp;gt; [[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Figures/&lt;/del&gt;RTCnoInternet.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PNG&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;fig:&lt;/del&gt;]]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/p&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;.5&amp;lt;/span&amp;gt; [fig:rtcwint] &lt;/del&gt;[[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Figures/&lt;/del&gt;RTCInternetNotSet.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PNG&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;fig:&lt;/del&gt;]]&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:RTCnoInternet.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;png|thumb&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;none|RTC with time set and no internet connection&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:RTCInternetNotSet.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;png|thumb|none&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;RTC without time set and no internet connection&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Connect your Pi to the internet and reboot so you can get the NTP time as shown in Figure [fig:rtcwint].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Connect your Pi to the internet and reboot so you can get the NTP time as shown in Figure [fig:rtcwint].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Set the System time to the RTC:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Set the System time to the RTC:&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;$ sudo hwclock -w&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;$ sudo hwclock -w&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ timedatectl&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$ timedatectl&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Figures/&lt;/del&gt;RTCset.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PNG&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;frame&lt;/del&gt;|none|alt=|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;caption &lt;/del&gt;Once you’ve connected to the internet and set the RTC&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span data-label=&amp;quot;fig:pinout&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:RTCset.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;png&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;thumb&lt;/ins&gt;|none|alt=|Once you’ve connected to the internet and set the RTC]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>CRNKEE002</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=97&amp;oldid=prev</id>
		<title>CRNKEE002: /* Test the Hardware */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=97&amp;oldid=prev"/>
		<updated>2020-02-06T10:32:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Test the Hardware&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:32, 6 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l91&quot; &gt;Line 91:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 91:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;instead of the address “6f”, you should see “UU”&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;instead of the address “6f”, you should see “UU”&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:UU.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;PNG&lt;/del&gt;|thumb|none|alt=|gpio i2cdetect showing the device at 0x6f is in use]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:UU.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;png&lt;/ins&gt;|thumb|none|alt=|gpio i2cdetect showing the device at 0x6f is in use]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>CRNKEE002</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=96&amp;oldid=prev</id>
		<title>CRNKEE002: /* Test the Hardware */</title>
		<link rel="alternate" type="text/html" href="http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=96&amp;oldid=prev"/>
		<updated>2020-02-06T10:31:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Test the Hardware&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 10:31, 6 February 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l90&quot; &gt;Line 90:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 90:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt; $ gpio i2cdetect&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt; $ gpio i2cdetect&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;instead of the address “6f”, you should see “UU”&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;instead of the address “6f”, you should see “UU”&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Figures/&lt;/del&gt;UU.PNG|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;frame&lt;/del&gt;|none|alt=|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;caption &lt;/del&gt;gpio i2cdetect showing the device at 0x6f is in use&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;span data-label=&amp;quot;fig:pinout&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:UU.PNG|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;thumb&lt;/ins&gt;|none|alt=|gpio i2cdetect showing the device at 0x6f is in use]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>CRNKEE002</name></author>
		
	</entry>
	<entry>
		<id>http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=51&amp;oldid=prev</id>
		<title>CRNKEE002: Created page with &quot;Category:RaspberryPi = RTC on the Pi =  The Raspberry Pi can make use of a kernel driver to handle an RTC (Real time clock). This page was written for use with the MCP7940...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.ee.uct.ac.za/index.php?title=RaspberryPi:RTC&amp;diff=51&amp;oldid=prev"/>
		<updated>2020-02-06T09:25:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/Category:RaspberryPi&quot; title=&quot;Category:RaspberryPi&quot;&gt;Category:RaspberryPi&lt;/a&gt; = RTC on the Pi =  The Raspberry Pi can make use of a kernel driver to handle an RTC (Real time clock). This page was written for use with the MCP7940...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:RaspberryPi]]&lt;br /&gt;
= RTC on the Pi =&lt;br /&gt;
&lt;br /&gt;
The Raspberry Pi can make use of a kernel driver to handle an RTC (Real time clock). This page was written for use with the MCP7940 IC. Adaptations may be required for different RTC ICs.&lt;br /&gt;
&lt;br /&gt;
The Pi doesn’t come with an RTC, and instead uses a daemon service called &amp;lt;code&amp;gt;fake-hwclock&amp;lt;/code&amp;gt; to handle the time. But, seeing that we have an RTC, we can use that instead. And by supplying an external current (from, say a CR2032, a common coin cell battery for RTCs), we can hold the time even while the Raspberry Pi is off and doesn’t have internet access.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This guide was tested on a fresh install of Raspbian Stretch, but should work fine on Buster, too.&lt;br /&gt;
&lt;br /&gt;
= Build the Circuit =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Build the RTC circuit and connect it to your Pi&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;SSH in to your Pi&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Run the following. We’re using the MCP7940, which means we expect a result at address &amp;lt;code&amp;gt;0x6f&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ gpio i2cdetect&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Configure the Pi =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Run the following:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ touch rtc.sh&lt;br /&gt;
$ chmod +x rtc.sh&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Using your favourite text editor, place the following script into &amp;lt;code&amp;gt;rtc.sh&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Take note when a red arrow appears below, you need to ensure that the text after the arrow is on the same line as the line above it (i.e. a red arrow just shows a line is split, the text should be on one line)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/bin/bash&lt;br /&gt;
# UniPi driver setup&lt;br /&gt;
# https://forum.unipi.technology/topic/171/mcp7491x-jessie/3&lt;br /&gt;
# Modified for the MCP7940x&lt;br /&gt;
&lt;br /&gt;
if [ &amp;amp;quot;$EUID&amp;amp;quot; -ne 0 ]&lt;br /&gt;
    then echo &amp;amp;quot;This script must be run as root&amp;amp;quot;&lt;br /&gt;
    exit&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Backup files&lt;br /&gt;
cp /boot/config.txt /boot/config.txt.bak&lt;br /&gt;
echo Enabling I2C bus...&lt;br /&gt;
&lt;br /&gt;
if ! grep -q '^dtparam=i2c_arm=on' /boot/config.txt&lt;br /&gt;
    then echo 'dtparam=i2c_arm=on' &amp;amp;gt;&amp;amp;gt; /boot/config.txt&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
if ! grep -q '^dtparam=i2c_baudrate=400000' /boot/config.txt&lt;br /&gt;
    then echo 'dtparam=i2c_baudrate=400000' &amp;amp;gt;&amp;amp;gt; /boot/config.txt&lt;br /&gt;
fi&lt;br /&gt;
echo Enabling the RTC chip...&lt;br /&gt;
if ! grep -q '^dtoverlay=i2c-rtc,mcp7940x' /boot/config.txt&lt;br /&gt;
    then echo 'dtoverlay=i2c-rtc,mcp7940x' &amp;amp;gt;&amp;amp;gt; /boot/config.txt&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Getting i2c development tools&lt;br /&gt;
apt-get install -y i2c-tools&lt;br /&gt;
if ! grep -q '^i2c-dev' /etc/modules&lt;br /&gt;
    then echo 'i2c-dev' &amp;amp;gt;&amp;amp;gt; /etc/modules&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
echo Removing fake-hwclock...&lt;br /&gt;
apt-get purge -y fake-hwclock&lt;br /&gt;
update-rc.d -f fake-hwclock remove&lt;br /&gt;
apt-get autoremove -y&lt;br /&gt;
&lt;br /&gt;
sed -i '/^if \[ -e \/run\/systemd\/system/,/^fi/s/^/#/'  /lib/udev/hwclock-set &lt;br /&gt;
&lt;br /&gt;
echo ' '&lt;br /&gt;
echo 'UniPi installed.'&lt;br /&gt;
echo ' '&lt;br /&gt;
echo '!!! REBOOT IS REQUIRED !!!'&lt;br /&gt;
echo ' '&lt;br /&gt;
&lt;br /&gt;
read -p &amp;amp;quot;Is it OK to reboot now? [y/N] &amp;amp;quot; -n 1 -r&lt;br /&gt;
echo ' '&lt;br /&gt;
if [[ $REPLY =~ ^[Yy]$ ]]&lt;br /&gt;
then&lt;br /&gt;
    reboot&lt;br /&gt;
else&lt;br /&gt;
  echo 'Reboot to finish configuring drivers'&lt;br /&gt;
fi&lt;br /&gt;
echo ' '&lt;br /&gt;
    &amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Run the script as sudo, as follows:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo ./rtc.sh&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;The script will prompt you to reboot. Do so.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Test the Hardware =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Once rebooted, SSH in to your Pi&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Run the following. We’re using the MCP7940, which means we expect a result at address &amp;lt;code&amp;gt;0x6f&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt; $ gpio i2cdetect&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;instead of the address “6f”, you should see “UU”&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:Figures/UU.PNG|frame|none|alt=|caption gpio i2cdetect showing the device at 0x6f is in use&amp;lt;span data-label=&amp;quot;fig:pinout&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Test the Software =&lt;br /&gt;
&lt;br /&gt;
And now for the fun stuff:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check if we can see the hwclock. Depending on whether or not you’re connected to the internet, you should see an arbitrary time&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo hwclock -r&amp;lt;/pre&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Assuming you have internet connectivity, your Pi should fetch the time through NTP&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Check the various times the Pi has access to:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ timedatectl&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Depending on whether or not you’ve connected to the internet, your results can look quite varied:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;.5&amp;lt;/span&amp;gt; [[File:Figures/RTCnoInternet.PNG|fig:]]&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;span&amp;gt;.5&amp;lt;/span&amp;gt; [fig:rtcwint] [[File:Figures/RTCInternetNotSet.PNG|fig:]]&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Connect your Pi to the internet and reboot so you can get the NTP time as shown in Figure [fig:rtcwint].&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Set the System time to the RTC:&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;$ sudo hwclock -w&lt;br /&gt;
$ timedatectl&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[File:Figures/RTCset.PNG|frame|none|alt=|caption Once you’ve connected to the internet and set the RTC&amp;lt;span data-label=&amp;quot;fig:pinout&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;]]&lt;br /&gt;
&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>CRNKEE002</name></author>
		
	</entry>
</feed>