CSCI 255 Homework 7

This assignment is due in class or to my office assistant in RRO 215 by 9:30 AM on 25 October. It s also a repeat of Homework 3 from the Fall 2010 semester.

Start by looking on pages 29 to 39 of the PIC24HJ32GP202/204 and PIC24HJ16GP304 Data Sheet. In this problem you are really going to be expected to match an SFR name to an SFR address. For example, the name PCL is matched to address 002E in Table 4-1 on page 29. However, to make the task slightly less tedious, the registers will be restricted to pages 29 and 38,

The Problem

Using the instruction set format described in your textbook and in the PIC instruction spreadsheet, translate each of the following PIC instructions into a 24-bit PIC instruction specified in binary. If you want the really detailed instruction set format description try the 16-bit MCU and DSC Programmer's Reference Manual.

  1. ADD     #200,W13
  2. INC     PORTB,WREG
  3. INC.B   LATB
  4. MOV     #200,W8
  5. MOV     PORTC,W3
  6. MOV     SR,W8
  7. MOV     WREG,SPLIM
  8. MOV     W8,PCL
  9. MOV.B   TRISA
  10. MOV.B   #18,W5