Write an assembly code segment that calls the subroutine

Assignment Help Electrical Engineering
Reference no: EM1325652

(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?

Reference no: EM1325652

Questions Cloud

Does publishing record make you a better college teacher : Some universities reward the prolific research professors with fewer classes; some do not have to teach every semester. What do you think about this practice?
What is the throughput : Measurements of the slotted ALOHA channel with an infinite number of users show that 10 percent of the slots are idle.
Explain e-commerce unit : Explain E-commerce unit and outline the formal documents needed to launch the new e-commerce unit
Important information about right to privacy : Important information about right to privacy - What are the limits to an employee's right to privacy at work in regards to telecommunications and information?
Write an assembly code segment that calls the subroutine : Write an assembly code segment that calls the subroutine New Function if bits 5 and 6 of PORTD equal 1. Write the same code segment in part (a) using structured assembly constructs.
Important information about business code of ethics : Consumer confidence has fallen considerably in last several years. Where consumer confidence is slow to return because so many of these businesses operated for years and had the vail over all our eyes and suddenly things fell apart and all was rev..
Show what are your thoughts on this conflict : Computer security software - violation of their own appropriate computer use policies. What are your thoughts on this conflict?
Federal reserve would change the money supply : Elucidate three arious ways in which the Federal Reserve would change the money supply.
Experimental research in social psychology : Describe how social psychology distinct from other disciplines, like clinical psychology, general psychology, and sociology.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Implement a multiple mode counter

Implement a multiple mode counter

  Ac analysis gain at midband with bypass capacitor

AC Analysis Gain at Midband (with bypass capacitor in circuit) Connect the bypass capacitor using the switch.

  Problem on transmission line operation

Evaluate the TL parameters. Include the effect of the earth as ideal. Do not incorporate the effect of the shield wires.

  Nibco''s big bang - an sap implementation

Analyze Case Study - NIBCO's 'Big Bang': An SAP Implementation- Explain the pros and cons of the approach to implementation decided upon by NIBCO.

  Frequency division multiplexing

Write a short technical report on Frequency Division Multiplexing

  Evaluate cross or auto correlation

You have to figure out which one using cross or auto correlation.

  How a transformer works

How a transformer works and apply those rules to a transformer where the primary core cross-sectional area is twice.

  Stereotaxic neurosurgery for electrode implant

Utilizing the rat stereotaxic atlas in the course materials, devise a surgical plan for implanting a Michigan type array

  What local oscillator frequency would you use

For the local oscillator you selected, what transmission frequencies could cause interference to the satellite system and how could the interference be avoided? Show a diagram.

  Report changes on primavera

Can you write a part of project which is about developing a schedule of power substation on primavera (P6), focusing on the Changes that will happen based on the following:

  Combinational logic devices for specific purposes

Interpret manufacturer's data sheet to select appropriate combinational logic devices for specific purposes

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

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