Question: Task 1 - Consider 8 switches and 8 LEDs in the Edsim 5 1 simulator in the following schematic. Write an 8 0 5 1

Task 1- Consider 8 switches and 8 LEDs in the Edsim51 simulator in the following schematic.
Write an 8051 assembly program to check the status of Sw1, Sw2 and Sw3 and turn on and off the LEDs
according to the following table. In this table, O stands for Open and C stands for Close.Task 1- Consider 8 switches and 8 LEDs in the Edsim51 simulator in the following schematic.
Write an 8051 assembly program to check the status of Sw1, Sw2 and Sw3 and turn on and off the LEDs
according to the following table. In this table, O stands for Open and C stands for Close.
Task 2- Write an 8051 assembly program to check all the 8 switches and if the number of closed
switches is even then shows the following pattern on the LEDs
\table[[,,,,,,]]
And if the number of closed switches is odd, shows this pattern
Hint: XOR(an,...a2,a1)=1 if the number of 1's is odd. In the 8051, Xor instructions syntax is as follow:
XRL c, bit
And you can transfer a bit to another one by the following instructions:
Mov c, bit
Mov bit, c
Also, you can check the value of carry flag with the following instructions:
JC Label
jump to label if c==1
JNC Label
By the way can you explain how to work it on the simulator because when i checked the previous answers my edsim doesnt respond
 Task 1- Consider 8 switches and 8 LEDs in the Edsim51

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 Databases Questions!