<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6275_Embedded_Controller_III%2FNov_2016%2FOpgave_tid</id>
		<title>6275 Embedded Controller III/Nov 2016/Opgave tid - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://mars.merhot.dk/w/index.php?action=history&amp;feed=atom&amp;title=6275_Embedded_Controller_III%2FNov_2016%2FOpgave_tid"/>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6275_Embedded_Controller_III/Nov_2016/Opgave_tid&amp;action=history"/>
		<updated>2026-05-22T02:23:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.0</generator>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6275_Embedded_Controller_III/Nov_2016/Opgave_tid&amp;diff=35727&amp;oldid=prev</id>
		<title>Heth: /* Tids opgave */</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6275_Embedded_Controller_III/Nov_2016/Opgave_tid&amp;diff=35727&amp;oldid=prev"/>
				<updated>2016-11-15T07:30:43Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Tids opgave&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='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:30, 15 November 2016&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-l6&quot; &gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[https://tools.ietf.org/html/rfc4330 RFC4330 (SNTP)]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[https://tools.ietf.org/html/rfc4330 RFC4330 (SNTP)]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[[STM32F107VC/timer2|Timer 2]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*[[STM32F107VC/timer2|Timer 2]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;==Videoer==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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://www.youtube.com/watch?v=-5wpm-gesOY TidsZoner]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; 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;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Kravspec==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Kravspec==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Tæller UNIX tid i RTC&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*Tæller UNIX tid i RTC&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	<entry>
		<id>http://mars.merhot.dk/w/index.php?title=6275_Embedded_Controller_III/Nov_2016/Opgave_tid&amp;diff=35713&amp;oldid=prev</id>
		<title>Heth: Created page with &quot; = Tids opgave= *Using the RTC Real Time Clock *:Category:Embedded *Category:Time *[https://tools.ietf.org/ht...&quot;</title>
		<link rel="alternate" type="text/html" href="http://mars.merhot.dk/w/index.php?title=6275_Embedded_Controller_III/Nov_2016/Opgave_tid&amp;diff=35713&amp;oldid=prev"/>
				<updated>2016-11-14T09:15:15Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot; = Tids opgave= *&lt;a href=&quot;/w/index.php/STM32F107VC/Using_the_RTC_Real_Time_Clock&quot; title=&quot;STM32F107VC/Using the RTC Real Time Clock&quot;&gt;Using the RTC Real Time Clock&lt;/a&gt; *&lt;a href=&quot;/w/index.php/Category:Embedded&quot; title=&quot;Category:Embedded&quot;&gt;Category:Embedded&lt;/a&gt; *&lt;a href=&quot;/w/index.php/Category:Time&quot; title=&quot;Category:Time&quot;&gt;Category:Time&lt;/a&gt; *[https://tools.ietf.org/ht...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
= Tids opgave=&lt;br /&gt;
*[[STM32F107VC/Using the RTC Real Time Clock|Using the RTC Real Time Clock]]&lt;br /&gt;
*[[:Category:Embedded]]&lt;br /&gt;
*[[:Category:Time|Category:Time]]&lt;br /&gt;
*[https://tools.ietf.org/html/rfc4330 RFC4330 (SNTP)]&lt;br /&gt;
*[[STM32F107VC/timer2|Timer 2]]&lt;br /&gt;
== Kravspec==&lt;br /&gt;
*Tæller UNIX tid i RTC&lt;br /&gt;
** Epoch 1. januar 1970 kl. 00:00&lt;br /&gt;
*Kunne omregne mellem UNIX-tid og mennesketid [[Calendar_standards]]&lt;br /&gt;
**Fra UNIX-tid til mennesketid når tiden skal vises&lt;br /&gt;
**Fra mennesketid til UNIX-tid når tiden stilles&lt;br /&gt;
*Hente tid fra tids-source fx. NTP/SNTP eller/og GPS&lt;br /&gt;
===Facts===&lt;br /&gt;
*Der er 365,2425 dage per år &lt;br /&gt;
**Hvert fjerde år er et skudår, med mindre det kan divideres med 100 men ikke 400.&lt;br /&gt;
***År 1900 er ikke skudår men år 2000 er!&lt;br /&gt;
*UNIX epoch er 1. januar 1970 kl. 00:00. Det var en torsdag&lt;br /&gt;
*Der skal ikke tages hensyn til skudsekunder i dette projekt.&lt;br /&gt;
**UNIX epoch er en 32 bit signed integer. Posetive tal er efter 1970 og negative tal før 1970&lt;br /&gt;
*Et skudår har en ekstra dag i februar. (29 februar)&lt;br /&gt;
===Lidt inspiration===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I et ikke skudår har hver måned disse antal dage &lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
//Days in normal year, jan,feb .. dec (Not leap year)&lt;br /&gt;
uint8_t const daysmd[12] =  {31,28,31,30,31,30,31,31,30,31,30,31};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Et eksempel på en total tidsstruktur&lt;br /&gt;
&amp;lt;source lang=c&amp;gt;&lt;br /&gt;
struct TimeStruct {&lt;br /&gt;
        uint32_t     epoch;      // Seconds since 1. jan 1970 00:00:00&lt;br /&gt;
        uint32_t     tz;         // Timezone +/- x seconds from GMT&lt;br /&gt;
        uint32_t     year;       // year                 1970 to 2106&lt;br /&gt;
        uint32_t     sec;        // seconds                          00 to 59&lt;br /&gt;
        uint32_t     min;        // minutes                          00 to 59&lt;br /&gt;
        uint32_t     hour;       // hours                            00 to 23&lt;br /&gt;
        uint32_t     mday;       // day of the month         1 to 31&lt;br /&gt;
        uint32_t     mon;        // month                            0 to 11&lt;br /&gt;
        uint32_t     wday;       // day of the week          0=sunday, 1=monday...&lt;br /&gt;
        uint32_t     isdst;      // is Daylight Saving Time (DST)&lt;br /&gt;
                                 // isdst: 0 = not dst 1 = dst  2=Not used&lt;br /&gt;
        uint32_t     dstOnMon;   // Month (0-11) when DST starts&lt;br /&gt;
        uint32_t     dstOnMday;  // Day of month when DST starts&lt;br /&gt;
        uint32_t     dstOnHour;  // Hour of the day when DST starts&lt;br /&gt;
        uint32_t     dstOnMin;   // Minute of the hour when DST starts&lt;br /&gt;
        uint32_t     dstOffMon;  // Month (0-11) when DST ends&lt;br /&gt;
        uint32_t     dstOffMday; // Day of month when DST ends&lt;br /&gt;
        uint32_t     dstOffHour; // Hour of the day when DST ends&lt;br /&gt;
        uint32_t     dstOffMin;  // Minute of the hour when DST ends&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Embedded]]&lt;/div&gt;</summary>
		<author><name>Heth</name></author>	</entry>

	</feed>