Reference no: EM13190469
Question 1:
a) Write an assembly code segment that calls the subroutineNew Functionif 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.
Question 2:
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.
Find the shortest distance from one road to a gas station
: two straight roads intersect to form an angle of 75. find the shortest distance from one road to a gas station on the other road 1000 ft from the junction.
|
How many more feet of fence will the second garden
: A square garden plot measures 180 square feet. A second square garden plot measures 405 square feet. How many more feet of fence will the second garden plot require over that required for the first garden plot?
|
What is the smallest number of the remaining votes
: An election with 4 candidates (A, B, C, and D) and 132 voters is to be decided using the plurality method. After 120 ballots have been recorded, A has 26 votes, B has 18 votes, C has 42 votes, and D has 34 votes. What is the smallest number of the..
|
How many of each will jane purchase
: In each case, draw a budget line that shows her available choices, and indicate her best choice by adding indifference curves. Assume that Jane only cares about the number of peanuts, and not about the size of the bag.
|
Write an assembly code segment that calls the subroutine
: Write an assembly code segment that calls the subroutine New Functionif bits 5 and 6 of PORTD equal 1 and write the same code segment in part (a) using structured assembly constructs.
|
Determine convergent or divergence
: Determine convergent or divergence. SUM from n=0 to infinity for
|
Which project do you recommend
: Project B costs $18,000 and you estimate you could save 18 injuries over the same period. Which project do you recommend? (Assume equal distribution of injuries.)
|
When the allocatively efficient output is being produced
: What is the dollar value of the total surplus (producer surplus plus consumer surplus) when the allocatively efficient output Q1 level is being produced How large is the dollar value of the consumer surplus at that output Q1 level
|
Explain the reaction reaches equilibrium the concentration
: A reaction is initiated at 30°C by dissolving 0.2M fructose-1-phosphate in an aqueous solution. When the reaction reaches equilibrium the concentration of fructose-1-phosphate is 6.52 x 10-5M.
|