Dan84

What "delay" is it ?

Recommended Posts

Posted (edited)

Hi, i've started to play with timers and delays. In Di Jasio's PIC32 book i've found this code

void delay(uint32_t count)
{
    while(--count);
}

Who is count ? To whom it refers ?

SYSCLK ? PBCLK ? Something else ?

Edited by Dan84

Share this post


Link to post
Share on other sites

Hi @Dan84,

We do not have this text you are referring to.  This function looks to add a delay with count dictating how long. I believe this delay is based on whatever frequency your program is running at.

thank you,

Jon

Share this post


Link to post
Share on other sites

After some test i think this counter is related directly to sysclk. I don't know if i must consider it useful in this form or if it is better work always with opentimer function.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now