<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Counting Seconds in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197032#M8808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are looking for a sample project for the MCF52221, I have posted one here:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The project is named skeleton.zip and includes a timer (and a variable, "uint32 seconds;", that counts seconds, maintained in sources/timer.c).&amp;nbsp; You'd want to build the "Skeleton 52221" target.&amp;nbsp; If you run it on the M52221DEMO board, you'll see the LED blink.&amp;nbsp; You can also connect to USB in host or device mode (see readme.txt).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I believe you can never have too much sample code when trying to create something new, so I extracted all the general purpose codes from my three projects into the skeleton.zip archive to share with folks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you want to start with the archive, feel free to e-mail me any questions or whatever at &lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;rich@testardi.com&lt;/A&gt; -- it looks like I should have some unexpected free time coming up, being laid off, so I'll be hopefully working with some of this again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Oct 2008 00:19:41 GMT</pubDate>
    <dc:creator>RichTestardi</dc:creator>
    <dc:date>2008-10-25T00:19:41Z</dc:date>
    <item>
      <title>Counting Seconds</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197029#M8805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my application, I must be able to count seconds (1-10 seconds). This will be the time a LED will be on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I use the MCF52221. The application doesn't need to run in full clock speed. I thought I could use the general puporse timers, but using the original clock, a second would be to much time for the counter to count. So, I think I need to divide the clock of the system, but there are to much options (internal oscillator, relaxation oscillator) and configurations.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Again, I simply need to be able to count seconds. What is the smartest way to do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(sorry for the newbie question, again. I'm just a brazilian undergrad student trying to learn everything by myself)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 05:21:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197029#M8805</guid>
      <dc:creator>carlosmscabral</dc:creator>
      <dc:date>2008-10-24T05:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Seconds</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197030#M8806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;The simplest thing would be to use a different timer. Instead of the General Purpose Timer (GPT), you could try either the Real Time Clock (RTC) or a Programmable Interrupt Timer (PIT).&lt;BR /&gt;&lt;BR /&gt;The RTC counts in seconds, and you can set an alarm after a specified number of seconds.&lt;BR /&gt;&lt;BR /&gt;The PIT can be configured for a timeout count of up to around a minute.&lt;BR /&gt;&lt;BR /&gt;You might be interested to take a look at an application called ColdFire Init. This is a free tool which runs on Windows machines. It presents a graphical interface allowing you to configure a ColdFire processor, or just individual modules like the RTC and the PITs. It then allows you to auto-generate the appropriate intialisation code in C or assembler.&lt;BR /&gt;&lt;BR /&gt;ColdFire Init is available from:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.microapl.co.uk/CFInit/cfinit_main.html" target="test_blank"&gt;http://www.microapl.co.uk/CFInit/cfinit_main.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The MCF52221 is one of the supported processors (The tool does not do any ColdFire V1 parts)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Simon&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 15:47:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197030#M8806</guid>
      <dc:creator>SimonMarsden_de</dc:creator>
      <dc:date>2008-10-24T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Seconds</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197031#M8807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Carlos&lt;BR /&gt;&lt;BR /&gt;Take a look at the uTasker project.&lt;BR /&gt;It contains various methods for counting (using RTC, PIT, DMA Timer or operating system timers):&lt;BR /&gt;eg.&lt;BR /&gt;&lt;A href="http://www.utasker.com/forum/index.php?topic=35.0" rel="nofollow" target="_blank"&gt;http://www.utasker.com/forum/index.php?topic=35.0&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.utasker.com/docs/uTasker/uTaskerTimers.PDF" rel="nofollow" target="_blank"&gt;http://www.utasker.com/docs/uTasker/uTaskerTimers.PDF&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In addition, it supports USB on the M52221 for virtual COM as well as for firmware uploading, so you will have a very complete project to learn with. All can be simulated on the PC and it is completely free for study use - including support on its own forum for the Coldfire:&lt;BR /&gt;&lt;A href="http://www.utasker.com/forum/index.php?board=2.0" rel="nofollow" target="_blank"&gt;http://www.utasker.com/forum/index.php?board=2.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.uTasker.com" rel="nofollow" target="_blank"&gt;www.uTasker.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Oct 2008 23:54:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197031#M8807</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2008-10-24T23:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Seconds</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197032#M8808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are looking for a sample project for the MCF52221, I have posted one here:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &lt;A href="http://www.cpustick.com/downloads.htm" rel="nofollow" target="_blank"&gt;http://www.cpustick.com/downloads.htm&lt;/A&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The project is named skeleton.zip and includes a timer (and a variable, "uint32 seconds;", that counts seconds, maintained in sources/timer.c).&amp;nbsp; You'd want to build the "Skeleton 52221" target.&amp;nbsp; If you run it on the M52221DEMO board, you'll see the LED blink.&amp;nbsp; You can also connect to USB in host or device mode (see readme.txt).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I believe you can never have too much sample code when trying to create something new, so I extracted all the general purpose codes from my three projects into the skeleton.zip archive to share with folks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you want to start with the archive, feel free to e-mail me any questions or whatever at &lt;A href="mailto:rich@testardi.com" rel="nofollow" target="_blank"&gt;rich@testardi.com&lt;/A&gt; -- it looks like I should have some unexpected free time coming up, being laid off, so I'll be hopefully working with some of this again.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;-- Rich&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Oct 2008 00:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Counting-Seconds/m-p/197032#M8808</guid>
      <dc:creator>RichTestardi</dc:creator>
      <dc:date>2008-10-25T00:19:41Z</dc:date>
    </item>
  </channel>
</rss>

