Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Read all the notes up to this point. Information is critical especially on the i

ID: 2084798 • Letter: R

Question

Read all the notes up to this point. Information is critical especially on the indirect addressing approach that was presented in class. Please finish reading chapter 2 especially pages 11-16. Skim through chapters 3-6 focusing ONLY on the stuff covered in class and ignoring concepts like BANKED option etc. that were not mentioned in the lecture. Project: You are to build a simple Dice display for ONLY 1 dice using 7 LEDs and resistors along with our PIC processor. The program will cycle through a table in RAM that contains 15 "random" states of the dice. Obviously there are six possible dice states: 1, 2, 3, 4, 5, and 6. Arrange the LEDs so that they form a dice-like structure. An easy implementation is to save in RAM the 15 "random" states that you get and cycle through them using the indirect addressing option. Each state can then be "hardcoded" as a separate subroutine to be able to be displayed on the LEDs. Use again pins C0-C1 and B0...B6 of the PIC as used in the previous assignment. Obviously you will only need 7 pins now to represent the dice states (and not 8 like before). Introduce a delay of only 5 seconds between states. Once all 15 states are cycled through, flash the ALIVE LED twice, each time for 2 seconds and... repeat in an infinite loop. Producing the 15 random states will be the main challenging part of this exercise. To do this, search the internet or any book on numerical recipes in C or similar for a simple random number-generating routine. If you can not do this task, alternatively you can decide on 15 random numbers yourselves BUT you will lose significant credit from the project. Assume a positive hardware connection for the LEDs, just like the left-center and right LEDs of the board are currently connected. You will use a 1KOhm resistor or smaller. Debug the program in a modular way. Good luck!

Explanation / Answer

PIC CODE

==============================

MOVLW #55

MOVWF R2

=============================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote