Jump to content
Sign in to follow this  
fransp

Delay Times.

Recommended Posts

Hi All,

 

 

Which number s in the delay_ ( ) can I expect to be valid.

I tested

delay_ms(250) to be 250 ms,

delay_s(2) to be 2 seconds.

But ...

delay_ms(750) does not produce 750 ms.

 

Do I something wrong here?

 

Yes I used this :

#pragma CLOCK_FREQ 20000000

#pragma DATA _CONFIG, _PWRTE_OFF & _BODEN_OFF & _WDT_OFF & _LVP_ON & _CPD_OFF & _DEBUG_OFF & _HS_OSC & _CP_OFF

 

Thanks,

 

 

Frans.

Share this post


Link to post
Share on other sites

Frans,

 

Arguments to delay functions are unsigned chars, ie valid value range is 0 to 255.

When using delay_us, a minimum delay value of 1 is required.

 

Regards

Dave

Share this post


Link to post
Share on other sites
Frans,

 

Arguments to delay functions are unsigned chars, ie valid value range is 0 to 255.

When using delay_us, a minimum delay value of 1 is required.

 

Regards

Dave

 

 

Hello Dave,

 

 

Problem solved.

 

Thanks.

 

Frans.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...