Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Every time when Btn2 is pressed, the value on the left SSD (minutes) increases b

ID: 3121015 • Letter: E

Question

Every time when Btn2 is pressed, the value on the left SSD (minutes) increases by 1. The value rotates between 00 and 99. For example, if the current number is 98 and you want to set it to 02, you need to press Btn2 for 4 times to make it go through 9899000102. Note that the value on the right SSD (seconds) retains during this process.

Every time when Btn1 is pressed, the value on the left SSD (minutes) deceases by 1. The value rotates between 00 and 99. For example, if the current number is 02 and you want to set it to 98, you need to press Btn1 for 4 times to make it go through 0201009998. Note that the value on the right SSD (seconds) retains during this process.

coded in c on an mx7 digilent pic 32

Explanation / Answer

As of MX7 diligent pic32 it is like MIPS32 i.e Millions of instructions per second.. which ranges between 32 and 64.

So if we want to set it to 64, we need to press Btn 2 for 32 times to make it to go through 32 --> 33 --> 34 -->....... --> 62 --> 63 --> 64.

While if we want to set it to 32, we need to press Btn1 again for 32 times to make it to go through 64 --> 63 --> 62 -->..... --> 34 --> 33 --> 32.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote