4 Replies Latest reply on Apr 20, 2012 12:14 PM by JoMe_264151

    using RTC in PSoC3




      Need to update display of an LCD through per second interrupt stub of an RTC. KIndly help me with a small example project using RTC. Am unable to understand example given in the documentation.


      thnx in advance.



        • 1. Re: using RTC in PSoC3

          Neha, I have to admit that RTC is not an easy small usermodule. Partly that is because it contains a (nearly) complete calendar which is able to calculate the weekday for any given date, an alarm-clock and so on. The RTC may be programmed to generate an interrupt at every second, but that's like building a telescope for just watching birds.





          • 2. Re: using RTC in PSoC3



            from what I understood,you need to update the LCD every second,right? Is this content some time related info?


            If not,you could have a timer generating an interrupt every one second,and the interrupt thus generated update the LCD.

            • 3. Re: using RTC in PSoC3

              I'd recommend keeping as much code as possible out of the interrupt to improve system responsiveness. To do this, you could set a flag variable in the RTC once per second interrupt, and check for it in your main loop. When it's set in the main loop, update the LCD, and clear the flag.





              • 4. Re: using RTC in PSoC3

                It will not be THAT thing for an interrupt occuring every second, but generally it is more universal to increase a counter and use that to update a corresponding value and then resetting the counter. So you get the chance to count for lost interrupt-polls which may occur during heavy CPU-load