Home » Ask & Discuss » Board Exams - CBSE, ICSE, State Boards » Computer Science « Back to Discussion



Computer Science

New kid on the Block

Joined: 17 May 2009
Post: 1
17 May 2009 07:09:12 IST
0 People liked this
1
342 View Post
microcontroller 8051
None

for(i=0;i<1275;i++){} here the time delay caused is 1ms when it is programmed in 8051 C microcontroller.How is it?


Share this article on:

Comments (1)

Chirag Sangani's Avatar

Forum Expert
Joined: 12 Dec 2007
Posts: 611
26 May 2009 13:12:35 IST
1 people liked this

A microcontroller runs at a fixed speed, usually a few MHz. Insructions like the one you mentioned above take a long time to get executed since they involve many steps. Each step itself involves many clock cylces and each clock cycle has a fixed time duration. Hence, it is possilbe that such steps may cause a time delay of arnd 1 ms. This technique is commonly used where you want a time delay but dont want to / cannot use libraries like delay.h




Quick Reply


Reply

Some HTML allowed.
Keep your comments above the belt or risk having them deleted.
Signup for a avatar to have your pictures show up by your comment
If Members see a thread that violates the Posting Rules, bring it to the attention of the Moderator Team
Free Sign Up!

Preparing for IIT-JEE ?

Arihant Revision Package for IIT JEE - Books, Practice Tests + Rank Predictor


@ INR 1,995/-

For Quick Info

Name

Mobile No.

Find Posts by Topics

Physics.

Topics

Mathematics.

Chemistry.

Biology

Parents

Board

Fun Zone

Sponsored Ads