You are here

PSOC3 how to make a clock using RTC | Cypress Semiconductor

PSOC3 how to make a clock using RTC

Summary: 6 Replies, Latest post by Bob Marlowe on 29 Oct 2013 07:46 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
MacLiu's picture
3 posts

PSOC3 using PSoC Creator 3.0
Want to use the components Real-Time Clock (RTC) with Character LCD can produce a show date and time of the clock.

Read the components of the datasheet, still do not understand how to initialize the RTC this component, although the datasheet which a lot of API, but there is no sample code, whether seniors willing pointing.

I do not know where to find sample code for these components?

Also PSoC Creator 3.0 is the C language format whether keil C architecture?
There is no recommended Chinese books.

user_119377051's picture
866 posts

Hi MacLiu

Do you want to use RTC-module in Creator

I have a PSoC3 RTC design but that using external RTC device

Because of reason of power supply at back up.

I haven't use internal RTC, so sorry

MacLiu's picture
3 posts

Thank you for your answer.

I can understand what you say & built-in RTC power problem
Maybe for me this novice
Just want to use the more basic functions let me know how to use the API
So I would say no sample code Datasheet very difficult for me
No way to copy edge learning

user_119377051's picture
866 posts


Didn't you see the datasheet?

Right click RTC module and "Open Datasheet"

Is it not enough for you?

MacLiu's picture
3 posts

Thank you for your answer ~
I really right-click on the component, select "Open Datasheet"

I do not know how to set the current time to the RTC
Should look to use RTC_WriteTime ()
Just use this API to do before in the end of the initial or declaration which set or completely unaware

I may be too familiar relationship between the bar c language
I'm learning other languages ​​is to find sample code out while watching the results to modify
Slowly to understand the function of each syntax or API

"My shouts are using GOOGLE translation help."

user_14586677's picture
7646 posts

Search the forum, there was someone else that worked out an RTC example

if my memory serves me correctly.


Regards, Dana.

user_1377889's picture
9245 posts

For setting time, date, alarm use the appropiate APIs. As usual initialize the RTC-component first and then set the clock with a RTC_WriteTime().

Be aware that you need a 32kHz crystal to run the RTC.

Read a bit about "structures" and "pointers" in your favourite C - manual since the parameter for RTC_WriteTime() is indeed a pointer to a structure.




Log in to post new comments.