tut-ch2-ch3-Solutions.pdf - 300044 Microcontrollers PLCs(Microcontrollers Solutions to Tutorial Questions \u2013 week 10 Review Problems \u2013 Chapter 2 7

tut-ch2-ch3-Solutions.pdf - 300044 Microcontrollers...

This preview shows page 1 - 2 out of 3 pages.

1 300044 Microcontrollers & PLCs (Microcontrollers) Solutions to Tutorial Questions – week 10 Review Problems – Chapter 2 7. What is the address of the file register to be modified by theaddwf 0x230, finstruction? Solution: The file register with the address 0x230 is modified. 9. Given a 16 MHz clock, how long do the three instructions starting from location 0x020e(addwf, movwf, goto)of List 2-2 take to execute? Give the answer in us (microseconds). Solution: The addwf andmovwfinstructions require 1 instruction cycle, and the gotoinstruction requires 2 instruction cycles. The duration of 1 instruction cycle is equal to 4/16M=0.25 us. Thus the first two instructions require 0.25us each to complete and the last one 0.5us, and the total time is 1 us. 11. Write an instruction sequence that copies the contents of locations0x120through0x123to locations0x220through0x223, in data memory.Solution: 120H=0001 0010 0000 = 00010 - 010 0000 is in bank 2, and 220H=0010 0010 0000 is in bank 4. Then the data transfer can be accomplished by the following instructions: movlb 2 movf 0x120, w movlb 4 movwf 0x220 movlb 2 movf 0x121, w
Background image
Image of page 2

You've reached the end of your free preview.

Want to read all 3 pages?

  • Three '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors