Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Microprocessors and Lab. Throw the Dice program - Explanation: Pressing S2 button starts counting the diceval from 1 to 6 very fast so nobody can

Microprocessors and Lab.

image text in transcribed
Throw the Dice program - Explanation: Pressing S2 button starts counting the diceval from 1 to 6 very fast so nobody can perceive its value on LEDs. When S2 is released, counting stops and diceval value are observed on PortD in binary format. diceval will be between 1 to 6 . Please write the necessary assembler code for the pseudo code given below. (Please write your code from ORG 0x0000. No need Interrupt or Header files etc...) (SLO3) (25p) a. Do Initializations (Define : diceval is at 070, PortA-2 is S2 button input, PortD is all output to LEDs, set diceval value to one in the beginning.) b. If S2 is held pressed, diceval counts very fast (at processor speed, do no use any delay function.) c. Write diceval to Port D d. Check if the diceval =7. If yes, set diceval to 1 (You can use xorlw and z flag for it) e. If S2 left, diceval counting stops, so the diceval is seen on portd f. Goto step b

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Name the types of cash flows associated with financing activities.

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago