Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

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

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

Anonymous
Not applicable
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
1332 Views
Contributors