M1A3 Lab.docx - 1 Maci Ferguson ELEC307 Summer II 2020 Dr...

This preview shows page 1 - 4 out of 7 pages.

1 Maci Ferguson ELEC307- Summer II 2020 Dr. Sohail Anwar M1A3 Lab: Introduction to PIC18 Simulator
2 Table of Contents Problem Statement 3 Theoretical Analysis 3 Procedure 3 Source Code 4 Simulation 5-6 Results and Discussion 6 Conclusion 7 References 7
3 Problem Statement: Write instructions to light up alternate LEDs at PORTC. Please be sure to: Initialize PORTC as an output port (Logic 0 to TRISC sets up PORTC as an output port). Turn on the alternate LED on the 8xLED board of the simulator (byte 55H turns on alternate LEDs). Assemble and RUN the program below in PIC18 Simulator. Theoretical Analysis: The theory behind this exercise is straightforward. The student should be able to write a program that allows the microcontroller to light LEDs on alternate lights on the 8x LED board. Procedure: To achieve the goal of producing alternate lights on the 8x LED board, one must enter in the correct high-low binary code. For alternate lights this corresponds to 01010101 which is 55 in hex format. We first load the W register with 00 to prepare the configuration, then set PORTC as

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture