Jump to content

Recommended Posts

Hi

Can some please explain me the logic behind these functions.

I know it uses the CLOCK_FREQ value, but what is the code behind it?

 

void delay_us( unsigned char t )

void delay_ms( unsigned char t )

void delay_s( unsigned char t )

 

many thanks

John

 

Share this post


Link to post
Share on other sites

Hi John,

 

These are merely software loops.

 

Best to use a hardware timer if you don't like blocking functions or even Novo.

 

Cheers

 

Reynard

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...

×
×
  • Create New...