SSU ES 310 - ES 310 Lab 2 (3 pages)

Previewing page 1 of 3 page document View the full content.
View Full Document

ES 310 Lab 2



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

ES 310 Lab 2

20 views

Other


Pages:
3
School:
Sonoma State University
Course:
Es 310 - Microprocessors&System Design

Unformatted text preview:

Lab 2 Part I General knowledge 1 Open PIC18 Simulator IDE Make sure the device is set to PIC18452 2 Run the program on page 542 using the Program Memory Editor 3 After you finish executing the program specify the value of the following registers PC 4 5 6 7 8 WREG PORT C TRISC LATC Using Table 3 1 specify the SFR for PORT C Using Table 3 1 specify the SFR for TRISC What is the value of register FE8 in the SFRs What is it called What is the value of register FD8 in the SFRs What is it called What is the value of register FE0 in the SFRs What is it called Part II Practice 1 Open PIC18 Simulator IDE 2 Clear the memory 3 Write the value of following registers PC WREG PORT C TRISC 4 Identify the value of the following registers after each command Opcode Operant PC WREG Reg Address 1 MOVLW 0XF2 2 MOVWF 0X25 0 3 MOVFF 0X25 0X26 LATC Reg Content a Which of the commands above is considered to be direct addressing b Which command represents immediate addressing c Clear the memory in the program 5 Identify the value of the following registers after each command Opcode Operant MOVLW 0X5 ADDLW 0X3F ADDWF 0X5 1 0 ADDWF 0X5 0 0 ADDWF 0X5 F 0 INCF 0X5 0 0 INCF 0X5 1 0 PC WREG Reg 0x05 Content 6 Which flag is set in the status register after the program is competed Status Reg binary Part III Program In this section you are about to write a series of instructions such that after the program is executed the following can be observed you can use the assembler and write all the commands in order a Reg 0xA 0x12 b Reg 0xB 0x13 c Reg 0xC 0x14 d Reg 0xD 0x28 e Reg 0xE 0x28 List your program in the table below and complete each column properly Opcode Operant PC WREG Reg Add Reg Content Status Reg binary 2 Show snapshots of the simulator to verify the correctness of your program in each case Part IV Program 1 Make sure the STATUS register is set to zero Which status bits will be set after running the following commands Explain your answer MOVLW 0x88 SUBLW 0x88 2 In question above change the



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view ES 310 Lab 2 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view ES 310 Lab 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?