Question: The school children are planning to play the LUDO game. But, the children forgot to bring the dice to the play date. The children come

The school children are planning to play the LUDO game. But, the children forgot to bring the dice to the play date. The children come to you to ask for help. You, a very great tech geeky guy, wants to help them by writing the program on PIC16F887 microcontroller to accomplish the same task.
Now your task is to write an MPLAB-X XC8 program to perform rolling a dice operation. The functionality is described as follows: When the push button SW0 is pressed, the 7 segment display should show random values from 1 to 6. That is, every time the child presses the SW0, a new value between 1 and 6 should show up in the 7 segment display.
Push-button should be connected to PORTB
7-segment Display should be connected to PORTC
Constraints: A user-defined function random () should be used to calculate the random number and then be invoked/called from the main () function. This is to improve modularity in your programming. Also provide Proteus schematic digram with componet name.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!