Not applicable
Oct 13, 2015
05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 13, 2015
05:18 AM
Hi, I am confused with the calculation involved in the period count. By basic understanding, if i am not wrong, period count is calculated as below...
Count = Frequency x Delay;
I am sending 100(ms) as time delay and prescalar as 64. I am not getting correct time delay. Am I doing calculation in correct way ?
Count = Frequency x Delay;
I am sending 100(ms) as time delay and prescalar as 64. I am not getting correct time delay. Am I doing calculation in correct way ?
1 Reply
Not applicable
Oct 14, 2015
01:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oct 14, 2015
01:40 AM
Hi Salman11053,
I am not clear about the desired delay. Are you using the CCU4 as a timer to count to this desired delay?
If this is the case...
Desired delay = time to count for the CCU4 ( this is to be converted to frequency)
Frequency = CCU4 frequency = Clock frequency/ Prescaler factor
Count = Period value for the CCU4, PRS
Then, the formula will be
Count = (Frequency / Desired delay in frequency) -1
The Capture and Compare Unit 4 (CCU4) is a very versatile unit and can be used to generate PWM output with dedicated on and off time. It can be used as a counter or as a timer to generate events.. periodically. You may wish to refer to the CCU4 application note that gives examples on how to use the CCU4. The link is provided here:
http://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-ar...
Regards,
Daryl
I am not clear about the desired delay. Are you using the CCU4 as a timer to count to this desired delay?
If this is the case...
Desired delay = time to count for the CCU4 ( this is to be converted to frequency)
Frequency = CCU4 frequency = Clock frequency/ Prescaler factor
Count = Period value for the CCU4, PRS
Then, the formula will be
Count = (Frequency / Desired delay in frequency) -1
The Capture and Compare Unit 4 (CCU4) is a very versatile unit and can be used to generate PWM output with dedicated on and off time. It can be used as a counter or as a timer to generate events.. periodically. You may wish to refer to the CCU4 application note that gives examples on how to use the CCU4. The link is provided here:
http://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-ar...
Regards,
Daryl