wait instead of deay_ms

General discussion on mikroC.
Post Reply
Author
Message
coskunkazma
Posts: 34
Joined: 30 Aug 2011 07:03

wait instead of deay_ms

#1 Post by coskunkazma » 30 Jan 2012 22:28

is there any command, function or routine, instead of delay_ms, in order to make code wait without sleep.

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: wait instead of deay_ms

#2 Post by janko.kaljevic » 31 Jan 2012 10:43

Hello,

Delay_ms function will make MCU loop until desired time interval pass.
Sleep will make your controller wake up at appropriate time.

And you should use any of those according to your needs.
From your post I can not conclude what exactly do you need.

Best regards.

coskunkazma
Posts: 34
Joined: 30 Aug 2011 07:03

Re: wait instead of deay_ms

#3 Post by coskunkazma » 31 Jan 2012 10:50

You know when we use delay_ms(2000), program wait or sleep during this 2 seconds, I do not know interrupt can still work during this 2 seconds.

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: wait instead of deay_ms

#4 Post by p.erasmus » 31 Jan 2012 19:40

You guys amaze me !!!

This is certainly something you can find the answer for yourself ,
Why dont you program you development board to blink a led in Timer1 interrupt and in the main code you use the delay and see if the led blink because if it does then
the interrupts happen regardless of the delay routine

OR READ the device documentation ,
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

Post Reply

Return to “mikroC General”