Skip to main content

Time Delays in 8051 C

 Time Delays in 8051 C

Micro controller / electric engineering.


We can create time delay in 8051 C by two ways:


Using for loop statement


. Using the 8051 timers


We cannot get the exact delays using simple for loops because of following reasons:


1. The instruction execution speed varies according to the number of clock periods per machine cycle. The different variants of 8051 microcontroller use different clock periods per machine cycle.


2. The crystal frequency connected to the X₁-X₂ input pins. The duration of the clock period for the machine cycle is a function of this crystal frequency.


3. In case of C programs, it is the C compiler that converts the C statements and functions to assembly language instructions. As a result different compilers produce different code and hence instructions executed in a loop may vary with different compilers.

Comments

Popular posts from this blog

What is two transistor model of scr ? Explain SCR

  Power electronics Two Transistor Model of SCR full explain and pdf. Basic operating principle of SCR, can easily be understood by the two transistor model of SCR , as it is a combination of p and n layers. This is a pnpn thyristor. If we bisect it through the dotted line then we will get two transistors i.e. one pnp transistor with J 1 and J 2 junctions and another is with J 2 and J 3 junctions as shown in figure below. The relation between the collector current and emitter current is shown below Here, I C is collector current, I E is emitter current, I CBO is forward leakage current, α is common base forward current gain and relationship between I C and I B is Where, I B is base current and β is common emitter forward current gain. Let’s for transistor T 1 this relation holds And that for transistor T 2 Now, by the analysis of two transistors model we can get anode current, From equation (i) and (ii), we get, If applied gate current is I g then cathode current will b...

If K is the transformation ratio, then the secondary phase voltage of delta-delta connected three phase transformer will be

  Delta-Delta Connection in Three Phase Transformers - MCQs with Answers Q1. If K is the transformation ratio, then the secondary phase voltage of delta-delta connected three phase transformer will be. a. 1 / K times of the primary phase voltage b. Equal to the primary phase voltage c. 1 / K ∧ 2 times of the primary phase voltage d. K times the primary phase voltage ANSWER: d. K times the primary phase voltage

BISECTION METHOD (BOLZANO METHOD) / what is BISECTION METHOD (BOLZANO METHOD)

  Explain BISECTION METHOD (BOLZANO METHOD).  Engineering maths The method is applicable for numerically solving the equation  f ( x ) = 0 for the  real  variable  x , where  f  is a  continuous function  defined on an interval [ a ,  b ] and where  f ( a ) and  f ( b ) have opposite signs. In this case  a  and  b  are said to bracket a root since, by the  intermediate value theorem , the continuous function  f  must have at least one root in the interval ( a ,  b ). At each step the method divides the interval in two by computing the midpoint  c  = ( a + b ) / 2 of the interval and the value of the function  f ( c ) at that point. Unless  c  is itself a root (which is very unlikely, but possible) there are now only two possibilities: either  f ( a ) and  f ( c ) have opposite signs and bracket a root, or  f ( c ) and  f ( b...