Question

If the oscillator frequency is 12MHz. Please produce the pulses with period of 2ms at pin...

If the oscillator frequency is 12MHz.

Please produce the pulses with period of 2ms

at pin P1.0 . Duty cycle is one by one.
using assembly language 8051

Homework Answers

Answer #1

Answer :- Oscillator frequency is 12 MHz, hence timer frequency will be 12/12 MHz = 1 MHz.So one count time for timer is 1 us, delay = 2 ms, hence count value(for one pulse i.e. for 1 ms),
n = 0.001/0.000001 = 1000 = 3E8H.
The assembly code is written below-

ORG 0000H ;start cose from this address
MOV TMOD,#01H ;timer mode is mode 1 i.e. 16-bit timer
UP:SETB P1.0 ;making output high
LCALL DELAY ;call the delay sub-routine
CLR P1.0 ;clear the output
LCALL DELAY ;call the delay sub-routine
SJMP UP ;go to label name UP, for repeating the output
DELAY: ;label name DELAY
MOV TH0,#0FCH ;load timer0 upper half value
MOV TL0,#17H ;load timer0 lower half value
CLR TF0 ;clear timer interrupt flag
SETB TR0 ;start timer0
HERE:JNB TF0,HERE ;wait here till timer interrupt is generated
RET ;return from subroutine
END ;end of the program

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
5. Some cyclotrons used to produce radionuclides in nuclear medicine for cancer treatment are adjusted to...
5. Some cyclotrons used to produce radionuclides in nuclear medicine for cancer treatment are adjusted to accelerate deuterons. One example uses a dee radius of 0.5 m with an oscillator frequency of 11 MHz. (a) What magnetic field is required? (b) What is the final energy of the deuterons? (c) Assuming an acceleration potential between the dees of 100 kV, estimate the path length traveled by a deuteron during the acceleration process. At times one would like to use the...
Lasser Company plans to produce 21,000 units next period at a denominator activity of 63,000 direct...
Lasser Company plans to produce 21,000 units next period at a denominator activity of 63,000 direct labor-hours. The direct labor wage rate is $12.00 per hour. The company's standards allow 2 yards of direct materials for each unit of product; the material costs $7.70 per yard. The company's budget includes variable manufacturing overhead cost of $1.60 per direct labor-hour and fixed manufacturing overhead of $396,900 per period. Required: 1. Using 63,000 direct labor-hours as the denominator activity, compute the predetermined...
National Scan, Inc sells radio frequency inventory tags. Monthly sales for a seven-month period were as...
National Scan, Inc sells radio frequency inventory tags. Monthly sales for a seven-month period were as follows: Month Sales (000 units) Feb.       21 Mar.      20 Apr.       17 May       22 Jun.       20 Jul.         24 Aug.       22 Plot the monthly data on a sheet of graph paper. Forecast September sales volume using each of the following: (1) The naive approach (2) A five month moving average (3) A weighted average using .60 for August, .30 for July, and .10 for June (4)...
A particle with mass 2.61 kg oscillates horizontally at the end of a horizontal spring. A...
A particle with mass 2.61 kg oscillates horizontally at the end of a horizontal spring. A student measures an amplitude of 0.923 m and a duration of 129 s for 65 cycles of oscillation. Find the frequency, ?, the speed at the equilibrium position, ?max, the spring constant, ?, the potential energy at an endpoint, ?max, the potential energy when the particle is located 68.5% of the amplitude away from the equiliibrium position, ?, and the kinetic energy, ?, and...
How much money do you think you would earn in a period of 30 days if...
How much money do you think you would earn in a period of 30 days if you were paid as follows: one cent for the first day, two cents for the second day, four cents for the third day, eight cents for the fourth day, and so on (i.e. your salary doubles each day)? Do you think you would make very little money, just a few dollars, at the end of the 30-day period? Let us write a program to...
Chairvana’s Table Assembly Operations: Chairvana Inc. manufactures metal tables and chairs at its plant in Paxton,...
Chairvana’s Table Assembly Operations: Chairvana Inc. manufactures metal tables and chairs at its plant in Paxton, Illinois. Recently hired general manager, Bob Behar, is concerned about the large inventories and manufacturing inefficiencies in the plant. The Paxton plant has two separate assembly lines – one for chairs and one for tables. Demand for chairs is significantly larger than tables, so Bob decides to tackle the table assembly process for first. Bob has recently hired a summer intern, Eileen Mayer, who...
In MPLAB XIDE create a program using assembly to produce three different LED combinations using 4...
In MPLAB XIDE create a program using assembly to produce three different LED combinations using 4 LED lights and 4 switches that correspond to each LED. There will be 4 inputs and 4 outputs. The program includes three levels (the three LED combinations). Each level will be a random combination (i.e. red, blue, green, orange). The player will then repeat the combinations as accurately as possible. If the player repeats the led sequence correctly, the code will branch to the...
Simple Pendulum Please write your answers on a color of your choice. Purpose To determine the...
Simple Pendulum Please write your answers on a color of your choice. Purpose To determine the value of the gravitational acceleration by using a simple pendulum. Lab goals To be able to perform an experiment independently. To be able to take measurements, obtain results, and interpret them correctly.               To be able to estimate the accuracy of experimental results. Equipment A small object with a hole such as a bead or nut, and a long string A measuring tape...
Question two has four Parts (A,B,C,D) please select one of the answers below :    A)...
Question two has four Parts (A,B,C,D) please select one of the answers below :    A) A client is hospitalised with acute intestinal health problems. According to Maslow's basic needs model, which nursing diagnosis would take the highest priority? Select one: a. Self-Care Deficit related to weakness and debilitation b. Powerlessness related to chronic disease state. c. Risk for Injury related to unsteady gait. d. Altered Nutrition, Less than Body Requirements related to inability to absorb nutrients. B) The nurse...
Please answer entire problem(its only one question) 2. Change all of the numbers in the data...
Please answer entire problem(its only one question) 2. Change all of the numbers in the data area of your worksheet so that it looks like this: A B C D 1 Chapter 3: Applying Excel 2 3 Data 4 Unit sales 60,000 units 5 Selling price per unit $10 per unit 6 Variable expenses per unit $6 per unit 7 Fixed expenses $228,000 8 If your formulas are correct, you should get the correct answers to the following questions. (a)...