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

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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...

×