Question: Another Dice simulation: Create a C application using a 16F1823 to provide a dice simulation. The clock should run at 1MHz to make sure you
Another Dice simulation: Create a C application using a 16F1823 to provide a dice simulation. The clock should run at 1MHz to make sure you cant cheat. The dice should be rolled by a push button which triggers an interrupt to assign values for the two dice. This should be done by reading the clock, take the clock reading mod 5 add 1 thats your first die value. Shift the original clock reading to the right two places (divide by 4) and take mod 6 of that value and add 1 thats your second die value.
Display the two values on one 7 segment display alternate every two seconds. Do this by using timer1 driven by the clock use an overflow interrupt to trigger the switch between values.
Display should start with all seven segs illuminated to ensure everything is working.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
