cancel
Showing results for 
Search instead for 
Did you mean: 

Knowledge Base Articles

Delay time accuracy of CyDelay()/CyDelayUs() with PSoC3 device

Anonymous
Not applicable

Delay time accuracy of CyDelay()/CyDelayUs() with PSoC3 device

Question: Why there are so much error in using CyDelay() to generate fixed time delay?

 

Answer:

The CyDelay functions - CyDelay(), CyDelayUs() implement simple software-based delay loops. The loops are designed to compensate for bus clock frequency and some other factors, but there are additional factors that may also influence the actual time spent in the loop. The delay time of each function can be calculated by counting up the assembly instruction implemention time.

In case of a more accurate delay time demanded, hardware(PWM, Timer) mode should be considered.
 

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎Jul 12, 2011 02:49 AM
Updated by:
Anonymous
 
Contributors