Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

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

Step: 3

blur-text-image

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago