Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need a code for this project using C language in Pic18f microcontroller Assignment 5 Read all the notes up to this point. Information is
I need a code for this project using C language in Pic18f microcontroller
Assignment 5 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 20 "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 20 "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 pins Co-C1 and B.B6 of the PIC. Obviously you will need 7 pins now to represent the dice states. Introduce a delay of 2.5 seconds between states and show me the timing check using the oscilloscope. Once all 20 states are cycled through, flash the LEFT LED three times, each time for 3 seconds, flash the CENTER twice for 2 seconds and then the RIGHT LED once for 1 second and then repeat in an infinite loop. Also, you will be provided with one 7- segment display. Connect it to the unused PIC pins of your choice and keep an active SUM count of each of these dice states as they cycle through. So you will need to use same logic as Project 4 where you need the 7-segment to show the two digits in succession and then clear up etc. When you cycle through those 20 states the sum resets and you start from the beginning. Debug the program in a modular way. Good luck Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started