EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / 1 ms delay calculation

1 ms delay calculation

|

Microcontroller › 8051 › 1 ms delay calculation

  • This topic has 10 replies, 10 voices, and was last updated 8 years, 11 months ago by EngineersGarage.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • October 13, 2011 at 6:20 am #1310
    kirusanthan
    Participant

    why we put 1275 in  for loop for 1 ms …. crystal frequency is 11.0592 Mhz?

    i need clear answer….

    October 13, 2011 at 6:52 am #6707
    Qaisar
    Participant

     

       because this value give almost 1ms delay ..

     

      let if we use 11.0592MHz crystal ..

    u know 8051 takes 12 pulses for 1 machine cycle

    then period of one machine cycle would be 

     

     11.0592MHz/12 = 921.6KHz

     t = 1/f

    so time period of one machine cycle = 1/ 921.6KHz = 1.085us

     

     now when u run loop of 1275..

     delay would be 1275×1.085us = 1.3ms

     practically this value gives delay of almost 1ms… 

     

    correct me ……..

     

     

    regards

    August 30, 2013 at 7:29 pm #10400
    saptarshi mukherjee
    Participant

    i am trying to develop a 40 khz 10 volt pek to peak square pulse. during this process is that 1.3 ms to 1 ms approximation will not create a problem.????

    my english is not good enough. so plz ignore the grammatical mistakes in the problem statement.

    August 31, 2013 at 4:44 am #10404
    doraemon
    Participant

    @ saptarshi mukherjee you can use timer for generation of delay. for 40 khz time=1/40000 so 25 micro second. you can find 8051 timer calculator by googling.

    August 31, 2013 at 7:28 pm #10406
    saptarshi mukherjee
    Participant

    i have solved that problem. thanks.

    how to convert a received voltage at port 0 to a digital data. i need the c code for adc converter.

     

    September 30, 2013 at 12:36 pm #10498
    umar farrok
    Participant

    max=val; (variable with 8 bit data type)

    for two digit , three digit use the i value for example,

     

    three digit

     

    for(i=0;i<=2;i++)

    {

    temp=max/10;

    max=max%10;

    }

    October 28, 2013 at 1:15 pm #10557
    Ashish Chaudhary
    Participant

    but we can get exact 1ms by using msdelay(921)……..

    October 29, 2013 at 8:48 am #10559
    AJISH ALFRED
    Participant

    Hi,
    Timer is the best way, any inbuilt function can’t give proper delay always.

    July 9, 2016 at 4:59 am #14051
    Anonymous
    Guest

    Why is that value 1275 is considered specifically? 

    Please clarify this.

     

    July 9, 2016 at 7:54 pm #14053
    Ashutosh Bhatt
    Participant

    any how it is very hard to get exact delay upto few micro seconds (10us to 20us) in micro controllers

    in C language it will be even more worst. getting exact delay is not an easy task with timers also in C language

    u hv to allow some provision

    July 26, 2016 at 7:10 am #14077
    EngineersGarage
    Participant

    agreed with Ajish

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • PIC KIT 3 not able to program dsPIC June 19, 2025
  • Back to the old BASIC days June 19, 2025
  • using a RTC in SF basic June 19, 2025
  • what's it's name June 19, 2025
  • What is correct names for GOOD user friendly circuit drawing program? June 18, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise