• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » Stellaris® ARM® Microcontrollers » Stellaris® ARM® LM3S Microcontrollers Forum » Real Time Clock in LM3S6965
Share
Stellaris® ARM® Microcontrollers
  • Forum
Options
  • Subscribe via RSS
Helpful Stellaris® LM4F Series Links
  • LM4F Series
  • Stellaris PinMux Utility
  • Stellaris® LM4F120 LaunchPad
  • LM4F MCU Applications
  • LM4F MCU Video
  • ARM Cortex-M4F Whitepaper
  • Stellaris MCU Brochure
  • LM4F232 Eval Kit
  • Real Time Clock in LM3S6965

    Real Time Clock in LM3S6965

    This question is not answered
    manisha kodag
    Posted by manisha kodag
    on Jun 04 2012 11:34 AM
    Intellectual570 points

    Hello sir/madam,

    according to sample program (enet_io) provided with kit cortex lm3s6965, i control the on/off of lamp which is connected to the led.

    In this project LAMP is on/off according to the choice user given(i.e. by tick on the check box).

    Now my next step is that I want that at 7.00am LAMP will be automatically off; & at 7.00pm LAMP will be automatically on.

    For that i think that i have to use Real Time Clock(RTC). I am totally blank for RTC .

    So kindly tell me steps i have to follow for that.

    Thanks in advance.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • Sean de la Haye
      Posted by Sean de la Haye
      on Jun 04 2012 15:57 PM
      Intellectual2015 points

      Manisha,

      There are a number of ways to accomplish this goal.  Here is one way:

      1. Use the external crystal to generate a precise number of SysTick interrupts per second.  See the interrupts example application.

      2. Use the number of interrupts to track the time.  You could use the qs-logger application from the EK-LM4F232 as an example.

      3. When the time matches specific set points, control an external circuit or send commands to a module to control the lamp.  One solution is to use the X10 line of home automation products.  It appears they have modules that can be controller with a serial port.

      Thanks,

      Sean

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • manisha kodag
      Posted by manisha kodag
      on Jun 06 2012 22:08 PM
      Intellectual570 points

      hello sir,

      can you send me the link for the interrupts example application or any pdf file regarding this ?

      Thank you.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sean de la Haye
      Posted by Sean de la Haye
      on Jun 07 2012 08:45 AM
      Intellectual2015 points

      Manisha,

      Download and install the LM3S6965 StellarisWare package on this page -- http://www.ti.com/mcu/docs/mcuorphantoolsw.tsp?sectionId=632&orphantabId=8

      You can find the interrupts example in boards/ek-lm3s6865/interrupts.

      Thanks,

      Sean

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • manisha kodag
      Posted by manisha kodag
      on Jun 08 2012 01:03 AM
      Intellectual570 points

      Hello Sir,

      i read interrupt program .Also with kit lm3s6965 in boards/ek-lm3s6965/timer ,timer example is given.

      This example application demonstrates the use of the timers to generate periodic interrupts.  One timer is set up to interrupt once per second and  the other to interrupt twice per second; each interrupt handler will toggle its own indicator on the display. Same program can i use for switching OFF lamp at  7.00am and ON at 7.00pm.

      But for that ,timer is set up such that it interrupt at 7.00am and 7.00pm.

      For that what should be delay i have to given?

      Also in the datasheet of lm3s6965 it is told that general purpose timer modules can be Real-Time Clock when using an external 32.768-KHz clock as the input.

      How this external clock can be given?

      Whether this clock affect the clok which is used for programming? In progamming  clocking is set  to run directly from the crystal by using SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN |  SYSCTL_XTAL_8MHZ);

      Thanks in advance.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sean de la Haye
      Posted by Sean de la Haye
      on Jun 08 2012 09:36 AM
      Intellectual2015 points

      Manisha,

      You will have to develop a clock that keeps track of the current date and time.  There is an example of this in the ek-lm4f232 qs-logger application.  In essence, you will have to have separate variables that keep track of the hour, minute, and seconds.  The time will be advanced every second during the timer interrupt.  You will have to update the clock to the current date and time using keypad and display.  Next you will have to add checks for when clock equals 7.00am or 7.00pm.  

      Using the timer module to produce the 1 HZ pulse could be more accurate (timing wise) and could be used if you do not want to model the date and time.  It would require that you count from 0 to 43200 (the number of seconds in 12 hours).  This would be problematic since you would have to have start the MCU exactly 12 hours before you want it to trigger.  The 32,768 Hz external clock is driven on an even CPP pin.  There is no sysctl function needed.

      Sean

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use