100%(8)8 out of 8 people found this document helpful
This preview shows page 1 - 4 out of 7 pages.
1Maci FergusonELEC307- Summer II 2020Dr. Sohail AnwarM1A3 Lab: Introduction to PIC18 Simulator
2Table of ContentsProblem Statement 3Theoretical Analysis3Procedure3Source Code4Simulation5-6Results and Discussion 6Conclusion7References7
3Problem 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