<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://calebneedscollege.com/wiki/index.php?action=history&amp;feed=atom&amp;title=DS1302_RTC_Test</id>
	<title>DS1302 RTC Test - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://calebneedscollege.com/wiki/index.php?action=history&amp;feed=atom&amp;title=DS1302_RTC_Test"/>
	<link rel="alternate" type="text/html" href="http://calebneedscollege.com/wiki/index.php?title=DS1302_RTC_Test&amp;action=history"/>
	<updated>2026-04-24T19:02:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.1</generator>
	<entry>
		<id>http://calebneedscollege.com/wiki/index.php?title=DS1302_RTC_Test&amp;diff=76&amp;oldid=prev</id>
		<title>Legg: Created page with &quot;==Synopsis== Tests the attachment of a DS1302 RTC module ==Notes==  ==Code== &lt;syntaxhighlight lang=&quot;C++&quot; line='line'&gt; #include&lt;DS1302.h&gt; #include &lt;stdio.h&gt;    const int kCePin...&quot;</title>
		<link rel="alternate" type="text/html" href="http://calebneedscollege.com/wiki/index.php?title=DS1302_RTC_Test&amp;diff=76&amp;oldid=prev"/>
		<updated>2020-12-08T19:07:38Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Synopsis== Tests the attachment of a DS1302 RTC module ==Notes==  ==Code== &amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot; line=&amp;#039;line&amp;#039;&amp;gt; #include&amp;lt;DS1302.h&amp;gt; #include &amp;lt;stdio.h&amp;gt;    const int kCePin...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Synopsis==&lt;br /&gt;
Tests the attachment of a DS1302 RTC module&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C++&amp;quot; line='line'&amp;gt;&lt;br /&gt;
#include&amp;lt;DS1302.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  const int kCePin  = 5;  // Chip Enable&lt;br /&gt;
  const int kIoPin   = 6;  // Input/Output&lt;br /&gt;
  const int kSclkPin = 7;  // Serial Clock&lt;br /&gt;
  DS1302 rtc(kCePin, kIoPin, kSclkPin);&lt;br /&gt;
&lt;br /&gt;
  void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
  rtc.writeProtect(true);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  byte hr;&lt;br /&gt;
  Time tm = rtc.time();&lt;br /&gt;
  hr=t.hr;&lt;br /&gt;
  while(hr&amp;gt;12) hr -= 12;&lt;br /&gt;
  Serial.print(&amp;quot;(&amp;quot;);&lt;br /&gt;
  Serial.print(hr);&lt;br /&gt;
  Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt;
  Serial.print(t.min);&lt;br /&gt;
  Serial.print(&amp;quot;:&amp;quot;);&lt;br /&gt;
  Serial.print(t.sec);&lt;br /&gt;
  Serial.println(&amp;quot;)&amp;quot;);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Legg</name></author>
		
	</entry>
</feed>