<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmodRPI_RTC</id>
	<title>KAmodRPI RTC - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kamamilabs.com/index.php?action=history&amp;feed=atom&amp;title=KAmodRPI_RTC"/>
	<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;action=history"/>
	<updated>2026-04-24T16:44:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4872&amp;oldid=prev</id>
		<title>Grzegorzbecker: /* Description */</title>
		<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4872&amp;oldid=prev"/>
		<updated>2024-11-01T18:53:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Description&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:53, 1 November 2024&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;__jzpdf__&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;__jzpdf__&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;===== Description =====&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/ins&gt;===== Description &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=&lt;/ins&gt;=====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;A &lt;/del&gt;precise real-time clock module - RTC, designed for Raspberry Pi series computers. It is based on the DS3231 system, which has been connected to a battery that supports its operation in the event of a main power failure. Communication with the RTC clock takes place via the I2C interface.&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[https://kamami.pl/moduly-rtc/1191668-kamodrpi-rtc-modul-perfekcyjnego-zegara-czasu-rzeczywistego-rtc.html?SubmitCurrency=1&amp;amp;id_currency=1 KAmodRPI RTC] is a &lt;/ins&gt;precise real-time clock module - RTC, designed for Raspberry Pi series computers. It is based on the DS3231 system, which has been connected to a battery that supports its operation in the event of a main power failure. Communication with the RTC clock takes place via the I2C interface.&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;[[File:KAmodRPI5_RTC_1.jpg|none|800px|thumb|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;[[File:KAmodRPI5_RTC_1.jpg|none|800px|thumb|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grzegorzbecker</name></author>
	</entry>
	<entry>
		<id>https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4680&amp;oldid=prev</id>
		<title>Grzegorzbecker: /* Setting and reading from RTC*= */</title>
		<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4680&amp;oldid=prev"/>
		<updated>2024-10-31T12:57:02Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Setting and reading from RTC*=&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:57, 31 October 2024&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-l221&quot;&gt;Line 221:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 221:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&amp;gt;The RTC clock can be set to any time value, the command is used for this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&amp;gt;The RTC clock can be set to any time value, the command is used for this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&#039;&#039;&#039;&amp;lt;pre style=&quot;color: blue&quot;&amp;gt;hwclock --set &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;–date&lt;/del&gt;=&quot;2024-06-19 12:22:22&quot;&amp;lt;/pre&amp;gt;&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&#039;&#039;&#039;&amp;lt;pre style=&quot;color: blue&quot;&amp;gt;hwclock --set &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;––date&lt;/ins&gt;=&quot;2024-06-19 12:22:22&quot;&amp;lt;/pre&amp;gt;&#039;&#039;&#039; &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Of course, the date and time can be different but they must be written in the same way as in the above example. Now we can set the time in the system taken from the RTC clock, the command is used for this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;Of course, the date and time can be different but they must be written in the same way as in the above example. Now we can set the time in the system taken from the RTC clock, the command is used for this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo hwclock -s&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo hwclock -s&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Grzegorzbecker</name></author>
	</entry>
	<entry>
		<id>https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4436&amp;oldid=prev</id>
		<title>Grzegorzbecker: Created page with &quot;__jzpdf__ ===== Description ===== A precise real-time clock module - RTC, designed for Raspberry Pi series computers. It is based on the DS3231 system, which has been connecte...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.kamamilabs.com/index.php?title=KAmodRPI_RTC&amp;diff=4436&amp;oldid=prev"/>
		<updated>2024-10-26T15:45:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__jzpdf__ ===== Description ===== A precise real-time clock module - RTC, designed for Raspberry Pi series computers. It is based on the DS3231 system, which has been connecte...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__jzpdf__&lt;br /&gt;
===== Description =====&lt;br /&gt;
A precise real-time clock module - RTC, designed for Raspberry Pi series computers. It is based on the DS3231 system, which has been connected to a battery that supports its operation in the event of a main power failure. Communication with the RTC clock takes place via the I2C interface.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI5_RTC_1.jpg|none|800px|thumb|center]]&lt;br /&gt;
[[File:KAmodRPI5_RTC_2.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
The DS3231 system is a complete RTC clock, which is distinguished by high precision in time measurement. Excellent parameters were obtained by integrating a quartz resonator in the structure of the system and using temperature compensation.&lt;br /&gt;
There is a socket on the board for a CR1220 battery, which allows the clock to operate even in the absence of main power. The supply voltage required for correct operation is in a wide range of 2.3….5.5 V.&lt;br /&gt;
&lt;br /&gt;
===== Basic parameters =====&lt;br /&gt;
* Based on the DS3231 RTC clock system&lt;br /&gt;
* Clock with integrated quartz resonator and temperature compensation&lt;br /&gt;
* The time measurement error declared by the manufacturer of the DS3231 system does not exceed 2 minutes per year, when operating at a temperature in the range of -40...+85 ºC&lt;br /&gt;
* Calculates seconds, minutes, hours, days of the week, months and year&lt;br /&gt;
* Communication via the I2C interface (400 kHz)&lt;br /&gt;
* Includes a socket for a CR1220 backup battery&lt;br /&gt;
* Current consumption from the backup battery does not exceed 0.1 uA&lt;br /&gt;
* Optional interrupt output (INT) / rectangular signal (SQW)&lt;br /&gt;
* Optional reset output activated by a low supply voltage level (RST)&lt;br /&gt;
* Requires a power supply with a voltage in the range of 2.3….5.5 V&lt;br /&gt;
* Board dimensions 21x20 mm, height approx. 8 mm (without goldpin socket)&lt;br /&gt;
&lt;br /&gt;
===== Standard equipment =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Code&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Description&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* &amp;lt;b&amp;gt;KAmodRPI RTC&amp;lt;/b&amp;gt;&lt;br /&gt;
* &amp;lt;b&amp;gt;Backup battery&amp;lt;/b&amp;gt;&lt;br /&gt;
*&amp;lt;b&amp;gt;Additional female-male connector&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* Assembled and powered-up module&lt;br /&gt;
* CR1220 battery&lt;br /&gt;
* Allows you to connect the module to a Raspberry Pi computer equipped with a radiator&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI5_RTC_3.jpg|none|800px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Electrical diagram =====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_sch.jpg|none|600px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Communication connector compatible with Raspberry Pi =====&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Label&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Function&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;J2&amp;lt;/b&amp;gt;&lt;br /&gt;
Goldpin socket&amp;lt;br&amp;gt;2x5, 2.54 mm&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* I2C interface signals derived&lt;br /&gt;
* Additional INT interrupt signal derived&lt;br /&gt;
* Power input&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The signals on the communication connector have been arranged to correspond to the signals on the GPIO connector used in Raspberry Pi boards. The KamodRPI RTC module occupies only the first 10 pins of the 40-pin GPIO connector. The functions of the signals on the &amp;lt;b&amp;gt;J2&amp;lt;/b&amp;gt; connector are as follows:&lt;br /&gt;
* pin no. 1: &amp;lt;b&amp;gt;+5V&amp;lt;/b&amp;gt; - power input with a voltage of 2.3...5.5 V;&lt;br /&gt;
* pin no. 3: &amp;lt;b&amp;gt;SDA&amp;lt;/b&amp;gt; - I2C interface data line;&lt;br /&gt;
* pin no. 5: &amp;lt;b&amp;gt;SCL&amp;lt;/b&amp;gt; – I2C interface clock line;&lt;br /&gt;
&lt;br /&gt;
* pin no. 7: &amp;lt;b&amp;gt;INT&amp;lt;/b&amp;gt; – optional INT interrupt output or SQW square-wave signal. The signal is available only after making a tin drop jumper on the pads marked INT-GPIO and goes to the GPIO04 port on the Raspberry Pi board;&lt;br /&gt;
&lt;br /&gt;
* pin no. 9: &amp;lt;b&amp;gt;GND&amp;lt;/b&amp;gt; – power supply ground;&lt;br /&gt;
&lt;br /&gt;
* pin no. 2, 4, 6, 8, 10: pins are not connected.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_1.jpg|none|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Backup battery=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Description&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Function&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;BT1&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* CR1220 battery socket&lt;br /&gt;
* Allows the RTC clock to operate after a power failure&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The battery socket is located on the bottom side of the module board. The current consumption from the battery does not exceed 0.1 uA, which allows the clock to operate correctly for many years.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_2.jpg|none|350px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Additional features=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Description&lt;br /&gt;
! style=&amp;quot;text-align: center;&amp;quot;|Function&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|JP1&amp;lt;br&amp;gt;&amp;lt;b&amp;gt;INT-GPIO&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* Shorting the pads with a drop of tin connects the INT/SQW output of the DS3231 to the pin assigned to the GPIO04 port of the Raspberry Pi boards&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;INT, G&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;|&lt;br /&gt;
* The pad marked &amp;lt;b&amp;gt;INT&amp;lt;/b&amp;gt; is the INT/SQW output of the DS3231, which can be activated by an alarm or can be a square wave output. The pad marked &amp;lt;b&amp;gt;G&amp;lt;/b&amp;gt; is ground.&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align: center;&amp;quot;|&amp;lt;b&amp;gt;RST, G&amp;lt;/b&amp;gt;&lt;br /&gt;
| style=&amp;quot;text-align: left;&amp;quot;| * The pad marked &amp;lt;b&amp;gt;RST&amp;lt;/b&amp;gt; is the output that resets the activeane low supply voltage. The threshold is set to about 2.57 V. The pad marked &amp;lt;b&amp;gt; G&amp;lt;/b&amp;gt; is ground.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detailed information on the functionality and configuration of additional pins can be found in the DS3231 documentation.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_3.jpg|none|350px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Dimensions=====&lt;br /&gt;
The dimensions of the &amp;lt;b&amp;gt;KAmodRPI RTC&amp;lt;/b&amp;gt; module are about 21x20 mm, and the height without the connector is about 8 mm. The module is compatible with Raspberry Pi 5 boards and earlier versions of Raspberry Pi. Additional holes have been placed on the board, which may be useful for non-standard applications of the RTC module.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_4.jpg|none|400px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Running the module with Raspberry Pi 5=====&lt;br /&gt;
The KamodRPI RTC module is mounted on the first 10 pins of the GPIO connector of the Raspberry Pi computer as shown in the photos below:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| [[File:KAmodRPI5_RTC_5.jpg|center|500px|thumb|center]]&lt;br /&gt;
| [[File:KAmodRPI5_RTC_4.jpg|center|520px|thumb|center]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
If the Raspberry Pi computer is equipped with a radiator, the KAmodRPI RTC module should be mounted using an additional female-male connector. No element of the module, especially the battery basket, can touch the radiator. The connection should be made as in the photo:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI5_RTC_6.jpg|none|600px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
In this configuration, the KAmodRPI RTC module is placed above the radiator and the entire set can operate properly.&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| [[File:KAmodRPI5_RTC_8.jpg|center|510px|thumb|center]]&lt;br /&gt;
| [[File:KAmodRPI5_RTC_7.jpg|center|500px|thumb|center]]&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Configuring the I2C bus*======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; the described procedures apply to the Raspberry Pi 5 computer&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The first step will always be refreshing the repositories and software packages. We open the console, e.g. by pressing the key combination &amp;#039;&amp;#039;Ctrl+Alt+T&amp;#039;&amp;#039;, and then enter the commands:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo apt-get upgrade&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we will install a software package that makes it easier to work with the I2C interface. To do this, type the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo apt-get install i2c-tools&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next task we need to perform is to enable the I2C bus controller. We run the Raspberry Pi configurator with the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo raspi-config&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_5.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We select option 3 (&amp;#039;&amp;#039;Interface options&amp;#039;&amp;#039;), and then select option I5 (&amp;#039;&amp;#039;I2C&amp;#039;&amp;#039;). After confirming all changes, we will see a message that the I2C interface is ready.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_6.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
At this point, using the &amp;#039;&amp;#039;i2c-detect&amp;#039;&amp;#039; program we can check what devices have been connected to the I2C bus. We enter:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;i2cdetect -y 1&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The effect will be similar to the one shown below:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_7.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This means that there is a device on the I2C bus with address 68 (hex) - this is the address of the DS3231 chip.&lt;br /&gt;
&lt;br /&gt;
======Preparing the Raspberry Pi system*======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; the described procedures apply to the Raspberry Pi 5 computer&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
We start preparing the system by editing the /boot/firmware/config.txt file (in older versions of the Raspberry Pi operating system this is the /boot/config.txt file). To do this, type the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo nano /boot/firmware/config.txt&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At the end of the existing content, add the line:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;dtoverlay=i2c-rtc,ds3231&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_8.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then save the changes with &amp;#039;&amp;#039;Ctrl+O&amp;#039;&amp;#039; and close the editor with &amp;#039;&amp;#039;Ctrl+X&amp;#039;&amp;#039;. We restart the system, e.g. by typing:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;reboot&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
After restarting the system, we check the effectiveness of the changes by typing the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;i2cdetect -y 1&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
This time the effect should be as follows:&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_9.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
The UU designation, which replaced the previous value of 68, means that the system has correctly communicated with the clock and reserved its address.&lt;br /&gt;
&lt;br /&gt;
======Setting and reading from RTC*=======&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; the described procedures apply to the Raspberry Pi 5 computer&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can check the current system time using the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;date&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
To save the current time to the RTC module, enter the command:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo hwclock -w&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
whereas, to read the time from the RTC module, enter:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo hwclock -r&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_10.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;The RTC clock can be set to any time value, the command is used for this:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;hwclock --set –date=&amp;quot;2024-06-19 12:22:22&amp;quot;&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Of course, the date and time can be different but they must be written in the same way as in the above example. Now we can set the time in the system taken from the RTC clock, the command is used for this:&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;pre style=&amp;quot;color: blue&amp;quot;&amp;gt;sudo hwclock -s&amp;lt;/pre&amp;gt;&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:KAmodRPI_RTC_r_11.jpg|none|500px|thumb|center]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
The system time in Raspberry Pi 5 will be automatically taken from the RTC clock when the computer is started. The time will be automatically corrected when Raspberry Pi gains access to the Internet. Then the RTC time value will also be updated.&lt;br /&gt;
&lt;br /&gt;
===== Links===== &lt;br /&gt;
*[https://download.kamami.pl/p233506-ds3231_ds.pdf Data sheet of the DS3231 system] &lt;br /&gt;
*[https://wiki.kamamilabs.com/images/b/b2/KAmodRPI_RTC_3D.zip CAD model (STEP)]&lt;/div&gt;</summary>
		<author><name>Grzegorzbecker</name></author>
	</entry>
</feed>