Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > using RTC in PSoC3

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



using RTC in PSoC3
Moderator:
RKRM

Post Reply
Follow this topic



using RTC in PSoC3

neha posted on 13 Apr 2012 12:07 AM PST
Top Contributor
85 Forum Posts

Hi!

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.

Neha




Re: using RTC in PSoC3

Bob Marlowe posted on 13 Apr 2012 05:40 AM PST
Top Contributor
1768 Forum Posts

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.

 

Bob



Re: using RTC in PSoC3

kmmankad posted on 20 Apr 2012 07:46 AM PST
Top Contributor
268 Forum Posts

Neha,

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.



Re: using RTC in PSoC3

maxk posted on 20 Apr 2012 09:20 AM PST
Cypress Employee
12 Forum Posts

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.

Cheers!

-Max



Re: using RTC in PSoC3

Bob Marlowe posted on 20 Apr 2012 10:14 AM PST
Top Contributor
1768 Forum Posts

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

 

Bob

 






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS 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. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

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 and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers 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.

Spec No: None; Sunset Owner: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20