Home / Expert Answers / Electrical Engineering / in-this-assignment-we-will-use-mplabx-to-develop-and-simulate-an-assembly-language-program-for-the-pa435

(Solved): In this assignment, we will use MPLabX to develop and simulate an assembly language program for the ...



In this assignment, we will use MPLabX to develop and simulate an assembly language program for the PIC microcontroller that plays the guessing game, as described in Section 12.7 of the Wakerly textbook, 5th ed. The assembly language program is to be tested using MPLab to apply the sequence of inputs given below. The state diagram for this homework is modified such that there is a WIN output connected to a green light showing that the guess was right (WIN is asserted in the SOK state and the green light turns on if the guess was correct). This state machine has 4 inputs and 6 outputs. Students should use the PIC16F84A. The required pin assignments are given in the following table. Required Pin Assignments Inputs Right Outputs Function PIC Function PIC G1 RA0 L1 RB0 G2 RA1 L2 RB1 G3 RA2 L3 RB2 G4 RA3 L4 RB3 ERR RB4 WIN RB5 A high output is used to turn on a light while a low output signifies that the light is off. Programs should initialize to state S1 and include a delay of ~1.0 second from one state to the next in the rotating light pattern. This delay could be created in different ways, for example, using a simple program loop, or using a timer with or without interrupts. It need not be precise, but should be accurate to \pm 0.05 seconds. You may choose your processor clock frequency to adjust the state delay. The program should be tested using a stimulus workbook (“guessing_game_stimuli_Spring2023.sbs”) that has been posted on Canvas with this assignment. This external stimulus is applied using Stimulus  open a stimulus workbook (from icons to the left of the Stimulus window) being sure to “Apply” the stimulus before you start debugging your code. Your solution to this homework should include your documented assembly language code and watch window to demonstrate that your game responds properly to stimulus. This example shows a watch window following the first wrong guess. Your solution should show this watch window following each state change. This can be done most easily by setting breakpoints immediately following each state change in



We have an Answer from Expert

View Expert Answer

Expert Answer





We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe