Fall 2010 CSCI 255 Homework 3

Due date

This assignment is due in class or to my office assistant in RH 215 by 3:00 pm on 19 October.

Start by looking on pages 29 to 39 of the PIC24HJ32GP202/204 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 spreadsheet discussed in class, 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
  3. INC.B   LATB
  4. MOV     #200,W8
  5. MOV     PORTC,W3
  6. MOV     SR,W8
  8. MOV     W8,PCL
  9. MOV.B   TRISA
  10. MOV.B   #18,W5