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

  Function of the hmi in a scada system

This assignment contains electronics engineering questions like State the commonly found components of a SCADA (Supervisory control and data acquisition) system. and decribe the function of the HMI in a SCADA system.

  Write the ybus matrix

Identify the bus types and the unknown variables of the power flow problem. Write the complete set of equations needed to solve the load flow problem.

  Principles of the super-heterodyne receiver

Write a brief explanation of the principles of the super-heterodyne receiver.  It may help to use a simple block diagram to express the process.  Explain the purpose of the Intermediate Frequency amplifiers,

  Determine the voltage across the electrical model

Determine the Voltage across the electrical model of a cell membrane in a nerve cell

  Ziegler-nichols open loop tuning

Ziegler-Nichols Open Loop Tuning Often, when working with a faster loop, many people will opt only for a PI control philosophy

  Stereotaxic neurosurgery for electrode implant

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

  Design a 2-digit 24 second shot-clock

Design a 2-digit 24 second "shot-clock" countdown timer with pushbutton controller.

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

  Future generation telecommunication technology

Write a report on Future Generation Telecommunication Technology.

  Draw a relay construction diagram

Draw a relay construction diagram and briefly explain the operation of a relay.

  Paper on orthogonal frequency-division multiplexing

This document is shown a paper on Orthogonal frequency-division multiplexing with advantages, disadvantages and uses.

  Compute the transfer function

In this project we will consider the control of a synchronous generator supplying electricity to the grid.

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