Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
I want an RTC with microsecond intervals, I'm using the RTC module existing in PSOC 5 prototype Kit, and to generate the microseconds I am using a up counter with a 1MHz in the input, my problem is how to reset the counter each one second interrupt of the RTC ?
I don't Know how to use RTC interrupts, I'd like to put this function "Counter_Init();" in the " RTC_EverySecondHandler(void)"
Adonis: Are you using the CY8CKIT-059 PSOC 5LP? If so you need to add A WCO crystal on P15.2 and P15.3 to drive the RTC component. Then the RTC will be functional and you can then use it to trigger you counter and sync it for you clock. You should provide a 32.768-kHz clock from an external crystal oscillator. The accuracy of this component is defined by the accuracy of the connected external clock source. Refer to the Clock Editor section of the PSoC Creator Help for information about how to connect and configure the built-in XTAL_32KHZ clock in your design.
Bobgoar: Yes I am using the 32.768-kHz crystal oscillator, The RTC is working well, but I don't know how to use the every second interrupt from RTC. I'd like to use this interrupt to initiate the counter.
The problem is to synchronize the ms to the RTC seconds. I would suggest to use the OPPS (one pulse per second) to reset the timer either using the interrupt of the opps or using the signal coming from the opps. I didn't try yet and I do not want to spoil your fun testing it.