Find the number of ones in file register location

Assignment Help Electrical Engineering
Reference no: EM13675007

Question 1:. Find the duration of the delay of each of the code segments below if the crystal frequency is 16 MHz.

(a)

 

(b)

 

COUNTER EQU 0x40

 

COUNTER1 EQU 0x40

 

COUNT EQU OxAD

 

COUNTER2 EQU 0x41

 

 

 

COUNT1 EQU OxAD

 

DELAY MOVLW COUNT

 

COUNT2 EQU Ox7E

 

MOVWF COUNTER

 

 

 

AGAIN NOP

 

DELAY MOVLW COUNT1

 

NOP

 

MOVWF COUNTER1

 

NOP

 

LOOP1 MOVLW COUNT2

 

DECF COUNTER, BNZ AGAIN

F

MOVWF COUNTER2 LOOP2 NOP

 

RETURN

 

NOP

 

 

 

NOP

 

 

 

DECF COUNTER2,

BNZ LOOP2

F

 

 

DECF COUNTER1,

BNZ LOOP1

F

 

 

RETURN

 

Question 2. What are the values of pons C and ID at the end of each of the following ro

(a)

 

(b)

 

ORG Ox10

 

ORG Ox10

 

CLRF TRISC

 

MOVLW 0x14

 

CLRF TRISD

 

MULLW 0x19

 

MOVLW Ox80

 

MULLW OxIE

 

MOVWF PORTC MOVLW OxAS MOVWF PORTD

 

MOVFF PRODL, MOVFF PRODH, END

PORTC
PORTD

REPEAT RACE PORTC,

F

 

 

BTG PORTD, 5

 

 

 

BTFSS PORTC,

3

 

 

BRA REPEAT

 

 

 

HERE    GOTO HERE

 

 

 

END

 

 

 

Question 3. Three LEDs are connected to pins 5 to 7 of port C. Write an Assembly program that will add 10 values that it receives through port B one value at a time. Once the sum of the values reaches or exceeds 0'100', one LED should turn on. Once the sum reaches or exceeds D'150', two LEDs should turn on. Finally, when the sum reaches or exceeds D'200', all LEDs should turn on. Verify the operation of your programs using MPLAB simulator. Include printout of the list file and file registers after execution.

Question 4. Write an Assembly program to find the number of ones in file register location 10H. Verify the operation of your programs using MPLAB simulator. Include printout of the list file and file registers after execution.

Question 5. Write a NOS Assembly program that will read 30 values through port B one value at a time. The first 10 values should be stored in addresses 50H to 59H, the second 10 values in addresses 60H to 69H, and the last 10 values in addresses 70H to 79H. Verify the operation of your programs using MPLAB simulator. Include printout of the list file and file registers after execution.

Reference no: EM13675007

Questions Cloud

Find what percentage of the molecules has escaped : Air in a cylinder is compressed to one-tenth of its original volume without change in temperature. Find what percentage of the molecules has escaped
What is the net charge of the bar : What is the total charge of all the electrons in 18 kg bar of molybdenum? (Molybdenum has 42 electrons per atom and an atomic mass of 96 u.) What is the net charge of the bar? What is the net charge of the bar if it managed to obtain rid of 7% of the..
Find how close will the helium nucleus come to gold nucleus : In 1911, Ernest Rutherford discovered the nucleus of the atom by observing the scattering of helium nuclei from gold nuclei. find how close will the helium nucleus come to the gold nucleus before it stops and turns around
Decide the rotational inertia of the solid cylinder : Sam wraps a string around the outside of a 0.040 m-radius 0.20 kg solid cylinder and utilizes it like a yo-yo. When released, the cylinder accelerates downwards at 2/3 g. Decide the rotational inertia of the solid cylinder.
Find the number of ones in file register location : Write an Assembly program to find the number of ones in file register location 10H and write a NOS Assembly program that will read 30 values through port B one value at a time.
Obtain how much time is the projectile in the air : A projectile is shot on level ground with a horizontal velocity of 20 m/s and a vertical velocity of 42 m/s. Obtain how much time is the projectile in the air
What was the original mass of the block of ice : A block of ice at 0°C is added to a 150 g aluminum calorimeter cup which holds 210 g of water at 12°C. If all however 2.0 g of ice melt, what was the original mass of the block of ice?
Calculate the temperature of the junction point : Rods of copper, brass, and steel are welded together to form a Y-Shaped figure. The cross-sectional area of each rod is 2 cm2. Calculate the temperature of the junction point
Decide forces that the moon and the sun exert on mass : Some people say that the tides on Earth are caused with the pull of the moon. Is this statement true? Which celestial body, the sun or the moon, has a greater pull on the waters of Earth? Decide the forces that the moon and the sun exert on a mass, m..

Reviews

Write a Review

Electrical Engineering Questions & Answers

  How does the combination work of band pass or band stop

A low pass filter has a cut-off frequency of 8 kHz and a high pass filter has a cut-off frequency of 5 kHz. These two circuits are connected back to back in cascade to form an input-output system. How does this combination work, band pass or band ..

  Define what is the stator current in phase b

Consider a 1.5 MVA, 4.16 kV, 3φ. 60 Hz synchronous generator. When operating at full load and rated voltage at a power factor of 0.9 lag, WHAT is the stator current in phase b[magnitude & angle]

  There are 15 randomly selected multiple choice questions

There are 15 randomly selected Multiple Choice questions

  Determine the four arithmetic operations performed

Input Xi and Yi of each Full Adder circuit in an arithmetic circuit has the digital logic specified by the following Boolean functions: Xi =Ai Yi = B*iS + BiCin* Where S is a selection variable, and Cin is the input carry, and Ai and Bi are the inp..

  What is the voltage at the output of the second amplifier

Two amplifiers are cascaded, one with a voltage gain of 6 db and the other with a voltage gain of 4. if 1 V is applied at the input of the first amplifier, what is the voltage at the output of the second amplifier

  Calculate the rms current through each diode

In a single-phase rectifier the input current can be approximated to have a triangular waveform every half cycle with a peak of 10A and a base of 60. Calculate the rms current through each diode.

  Calculate the maximum dynamic error of the sensor

An underdamped sensor with a static sensitivity of K=1, undamped natural frequency of omega=1400 rad/s, and damping ratio of zeta=0.5 is used to measure a sinusoidal signal with a frequency of 6 kHz.

  What is the speed of the package when it hits the ground

After a package is ejected from the plane, how long will it take for it to reach sea level from the time it is ejected Assume that the package, like the plane, has an initial velocity of 200 mph in the horizontal direction.

  Determine speed and line current when motor develops torque

A 220V dc shunt motor draws 10A at 1800rpm. The armature circuit resistance is .2ohm and the field winding resistance is 440 ohm.what is the torque developed by the motor

  Calculate the built-in electric field of silicon sample

The donor distribution of a nonuniformly doped silicon sample can be approximated by N(x) = Noexp(-x/x0), where x0 = 1 µm. As no current flows under the open-circuit condition, a built-in electric field is established

  Calculate average value of current i during life of battery

A standard D cell flashlight battery is connected to a load of 3 ohms. After 6 hr of intermittent use the load voltage drops from an initial 1.5 V to a final useful voltage of 0.9 V. (a) Calculate the internal resistance of the battery at the load ..

  Show the construction of an asynchronous mod 2 counter

show the construction of an asynchronous MOD 2 binary up/down counter withup/down counter control P, when P= 0, it counts up and, when P= 1,it counts downs.use JK flip-flop.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd