You are missing these commands time = RTC_GetTime(); and date = RTC_GetDate();
UART_UartPutString(" | ");
When I add time = RTC_GetTime() and date = RTC_GetDate(); , it says implicit declaration of function 'RTC_GetTime() ' is invalid in c99.
Bob Goars project using both functions compiles. What is your RTC component
RTC_ or RTC_1_, respectivley that would be RTC_GetTime( ) or RTC_1_GetTime().
I got RTC, not RTC_1, so I am doing it right.
I tried the sample program you took your program from and it didn't update it had the same issue you experienced with your code. I Am using a CY8CKit-059 Psoc 5 LP prototyping kit and after looking at the RTC for Psoc 4 and RTC for Psoc 5 and 3 they are different and use different code. The PSOC 5 component needs a 32Khz crystal to function. It is not loaded on the Cy8CKit -059 PSOC 5LP. So the display reads out the orginal data that was loaded at the start of the program. I had this issue with the program I sent you as I left out the SyTickISRhandler and it was not updating . So I must ask do you have a Crystal attached to your board? By the way I added the Uart to the orginal code and it is displaying the date and time but no upate.
Also the code I sent will only work on a PSOC 4 and not the PSOC 5 I assumed that the RTC component was the same for both devices but it is not.
I have not tried it on an LCD display.
Ak B: your cann't use my code with the PSOC 5 Component as it program functions are completely different that is why you got the error of C99 function not found on the Get_time and date line.
Is there any board with crystal for Psoc5LP , that you know ?
So, have you got your time updating with Cy8CKit -059 PSOC 5LP or it is still not working ?
There are currently two (completely different) RTC components: One for PSoC4 (a new one) and one for PSoC5.
APIs are slightly different and in the PSoC5 version special a function concerning DST is missing. The 5s APIs are quite too many, so it is easy to make mistakes, but it is working correctly. Keep in mind that a watch crystal is needed, because the accuracy of the internal IMO is 1% which would mean you can be half a week off in a year, not only some minutes.
The actual CY8CKIT-050 has got a 32.768kHz xtal on board, so with that kit you will be fine off.
On the CY8CKIT-059 is room for an xtal at location Y1 where you may solder one.
I don't think the xtal is on board, from the CY8CKIT-059 user
Odd though, its shown in BOM ?
Ahgrrr! Typo above - corrected. The CY8CKIT-050 has got an xtal.
The Crystal that is called out in the data sheet for the Cy8Ckit-059 5lp Prototyping kit is no longer available for purchase can you use a 12pf load cyrstal in its place?