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...

regula falsi, method / false position method / explain

regula falsi ,   method of false position , or   false position method   In   mathematics , the   regula falsi ,   method of false position , or   false position method   is a very old method for solving an equation with one unknown; this method, in modified form, is still in use. In simple terms, the method is the   trial and error   technique of using test ("false") values for the variable and then adjusting the test value according to the outcome. This is sometimes also referred to as "guess and check". Versions of the method predate the advent of   algebra   and the use of   equations . As an example, consider problem 26 in the  Rhind papyrus , which asks for a solution of (written in modern notation) the equation  x  +  x /4 = 15 . This is solved by false position. [1]  First, guess that  x  = 4  to obtain, on the left,  4 + 4/4 = 5 . This guess is a good choice since it pr...

Types of USB and Their Technical Specifications

Types of USB and Their Technical Specifications. USB (Universal Serial Bus) is a standard that was developed to simplify the connection between computers and peripheral devices. Over the years, several types of USB standards have emerged, each offering different capabilities. Here's a comprehensive guide to the different types of USB, including their technical specifications and comparisons. 1. USB Type-A Description : The original and most recognizable USB connector, typically used in computers, chargers, and peripherals. Specifications : Dimensions : 12.0 mm x 4.5 mm Versions : USB 1.0, USB 2.0, USB 3.0, USB 3.1, USB 3.2 Data Transfer Rates : USB 1.0: 1.5 Mbps (Low Speed) / 12 Mbps (Full Speed) USB 2.0: 480 Mbps (High Speed) USB 3.0: 5 Gbps (SuperSpeed) USB 3.1: 10 Gbps (SuperSpeed+) USB 3.2: 20 Gbps (SuperSpeed+) Power Delivery : Up to 2.5W (0.5A @ 5V) for USB 2.0, up to 4.5W (0.9A @ 5V) for USB 3.0 and above. Use Cases : Connecting keyboards, mice, flash drives, external hard d...