Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Electrical & Electronics Expert

(40) 2. Code Segment Writing.

a) Write an assembly code segment that calls the subroutine New Function if bits 5 and 6 of PORTD equal 1.  

b) Write the same code segment in part (a) using structured assembly constructs.  

c) Write an assembly code segment to toggle bit 4 of FORMBYTE, leaving the remaining bits unchanged.

d) Write an assembly code segment to form from the value of the char variable TEMPB a new value of  TEMPB of the form 000øbbbl2 where bbbb represents the original four most significant bits of TEMPB.  

e) Assume that WREG contains a number of the form 00000b2b1b0. Using a sequence of the three  instruction- xorwf, andlw, xorwf -‚ update the lower three bits of PORTB with the b2bb0 bits in WREG,  while leaving, the upper five bits of PORTB unchanged.   

 (20) 3. LCD Control and Display.

a) What is the cursor-position code, expressed as a hex number, that you would employ in a display string to center a two-character message in the top row of your 8x2 character display?

b) Write a code segment that displays the two character message "Hi" starting at the position you identified in part (a). Assume that the character string is residing in program memory and that the PIC microcontroller is initialized for a 4-bit interface LCD. (Accurate code is not required, rather, identify the required instruction steps.

(20) 4. a) Analyze the following assembly code segment:

MOVLF 60,COUNT

REPEAT_

btg PORTA,RA4

decf COUINT, F

UNTIL _.Z.  

b) Assuring that the internal clock rate of the microcontroller is 2.5MHz. What should the Bignum value for the LoopTime subroutine be to make it count with a scale of 2,500 cyclesto generate precisely a imillisecond delay between every rollover of TMROIF?

Electrical & Electronics, Engineering

  • Category:- Electrical & Electronics
  • Reference No.:- M9727886
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Electrical & Electronics

Questions -problem 1 - solve for i0 in fig using mesh

Questions - Problem 1 - Solve for i 0 in Fig. using mesh analysis. Problem 2 - Use mesh analysis to find current i 0 in the circuit. Problem 3 - Use mesh analysis to find v 0 in the circuit. Let v s1 = 120 cos(100t+ 90 o ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Questions -problem 1 - a series rlc network has r 2 komega

Questions - Problem 1 - A series RLC network has R = 2 kΩ, L = 40 mH and C = 1μF. Calculate the impedance at resonance and at one-fourth, one-half, twice, and four times the resonant frequency. Problem 2 - Design a serie ...

1 a name the three major groups of contamination and

1. (a) Name the three major groups of contamination and briefly describe their physical characteristics. (b) Where do the above contamination types come from? Give one example of each. 2. Name two processes metrics which ...

Case studythis assignment consists of a written report of

CASE STUDY This assignment consists of a written report of approximately 1000 words and any diagrams in which you are asked to critically compare different process methods used to achieve the same result and show an awar ...

Summative assessmentin 2017 sej101 assessment will consist

Summative Assessment In 2017 SEJ101 assessment will consist of nine tasks that will develop a portfolio of your assessed work. Throughout the trimester you will have the opportunity for feedback on all nine tasks before ...

Question 1 in the voltage regulator circuit in figure p221

Question 1: In the voltage regulator circuit in Figure P2.21, V 1 = 20 V, V Z = 10 V, R i = 222Ω and P z (max) = 400 mW. (a) Determine I L, I z , and I L , if R L = 380Ω. (b) Determine the value of R L , that will establ ...

Assignment -problem 1 -a consider the simplified dc system

Assignment - Problem 1 - a) Consider the simplified dc system shown in Fig. 1. Only one converter is modeled, with the remote end represented by a dc source. The ac system is rated at 345 kV, with the converter transform ...

Discuss the role of load factor on the cost of electrical

Discuss the role of load factor on the cost of electrical energy.

Question 1 a pnp transistor withnbspbeta 60 is connected

Question 1. A pnp transistor with β = 60 is connected in a common-base configuration as shown in figure P5.8 (a) The emitter is driven by a constant-current source with I E = 0.75 mA. Determine I B , I C , α, and V C . ( ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As