- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday i updated my PSoC creator, when i debug my last program (RTC) which i created in my previous Creator I got problem, my RTC using I2C show the wrong current time. there is no warning or error notification. anyone can help me?
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Weird!
Usually the Creator versions are co-existent, so there is a good chance that your previous version still exists on your PC.
Reading from I2C usually is not influenced by any version changes, but there is an RTC component, did you use that?
You didn't tell which board, wich PSoC you used. Helpful would be when you upload your complete project, so that we all can have a look at all of your settings? To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
id didnt use RTC. my project just include I2C and LCD on it. it is the sample project that i got from u and i modified it succesfully, but yesterday i updated my psoc creator, and it displays a wrong time and there are some non number character like =,>,< in the place of second. here i attach my project. i am using CY8CKIT-059 PSoC 5lp and DS 1307 Tiny RTC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
RTC.c is missing. Copy it to project folder and add it to project
Increase heap size to 0x200
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
do i need it? where i can find RTC.c file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry, it was a bit unusual for me to find an RTC.h file and no corresponding .c
So you do not need an RTC.c
Did you already increase the heap-size?
I cannot see where and how you initialize your DS 1307. Can you provide the values in CurrentTime[] after reading?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i already increase the heap size to 0x200, actually my current time in tiny RTC DS1307 is initialized in another device (arduino) then i just call/get the current time of what my RTC already has. and it works, showing current time correctly, but after i updated my creator, the time went wrong. did have code example about how to initialize my DS1307? i got it so difficult and clueless, it is really different from what i got in arduino about how to initialize the time.
thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide the values in CurrentTime[] after reading?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i cant, Can u explain about this Bob?
str[7] = ((Current_time[0]& 0x0F) +0x30);
it convert current time into string, but i dont get the idea about "& 0x0F) +0x30)" part.
and i think, get current time is only call the information from the DS 1307, but if we want to initialize it, where it should start? and which part we should modify?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you provide the values in CurrentTime[] after reading?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
str[7] = ((Current_time[0]& 0x0F) +0x30);
Conversion of the rightmost nibble into ASCII. Masking out the upper nibble and adding ASCII Zero character.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had this problem with my program. It was working and then it stopped working . I couldn't understand why so I purchased another unit and got the same results. The new unit came without the LIR2032 battery. I tried the battery from the old unit into the new unit and it still didn't work. After much research in the datasheet and on the web I discovered that you must rewrite a time to the unit Registers to get the module to start counting time. Also you can not operate the unit without the battery it will not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
can you explain how to rewrite the time or initialize it? i got some problems on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may use the debugger, set a breakpoint after the RTC has been red and have the debugger showing the values CurrentTime[] actually holds. Make a screenshot.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On application of power to the device the time and date registers are typically reset to 01/01/00 01 00:00:00
(MM/DD/YY DOW HH:MM:SS). The CH bit in the seconds register will be set to a 1.
The clock is halted. You can see that in the reading of ox88 in the 0 location of the Current_Time. You have to set the time in the DS1307.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, exactly what I expected. The values show a not-running uninitialized RTC. That was why I wanted to verify that data.
Bob