hi!i want to know how to to give a delay of 0.1 second in keil assembley of 8051 microcontroller, using timers. it would be great if any of you could help, esp with the code. i can give small delays easily but this is somewhat large....i have a project due and i am stuck at this. thankyou in advance:)
hahaha, good point. what i wanted was NOT to use this approach of looping, but i guess there is no other alternative, so i have done it:) thankyou:)
THREAD CLOSED PEOPLE, THANKS:):)
what i wanted was NOT to use this approach of looping, but i guess there is no other alternative, so i have done it
male cow manure and fatty red sausage, the 'alternative' was stated in the 3rd post in the thread.
Erik
A stopwatch have a fast hand that runs around the face many times. So you have a slower hand that counts number of times the fast hand have gone around.
Same with timers. The timer ticks comes quickly. So just as Erik said - inside the ISR you count up a variable to know how many interrupts you have had. With a 8-bit counter, you can count 0..255 interrupts. With a 16-bit counter, you can count 0..65535 interrupts. So no problem at all to measure times thousands or millions or quadrillions of times longer than the timer interrupt period.
A normal digital watch can only count 0..59 for seconds. But it still manages to handle time longer than that. Every overflow counts as a minute. Every minute overflow counts as an hour. Every hour overflow counts as a day.
So back to you - why do you think you need a loop?
dear mr idiot. if i was that advanced in the subject, i would not have asked such a basic question. sometimes, use your brain. helps your mental health.
thankyou so very much:) i wanted to use looping because i thought that if a smaller delay func is called many times, it would be equivalent to a larger delay. and also would you mind explaining what is delay over head??and roll over?? thankyou again:)i wouuld be grateful.
dear ms grateful
I appreciate your gratitude for pointing you in the right direction. I am sorry that you did not see fit to ask for having it bent in neon.
If you thought a bit about the replies you got it would improve your mental health
... which, clearly is required if you do not want 'charming replies'
I have got 'charming' replies "Do you think I am that stupid" I just got a 'charming' reply "Do you think I am that smart"
It is sad that todays kids take anything that is not to their liking as a reason to be hateful.
go to hell mr. think-i-am-the-smartest-person-on-earth.(bad times for earthlings)
go to hell mr. since I have no desire to meet you I won't