Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that a switch is connected to pin P1.4 and a value stored in R5. Write a program that checks that status of the switch

image text in transcribed
Assume that a switch is connected to pin P1.4 and a value stored in R5. Write a program that checks that status of the switch continuously, if the switch is ON decrement the value of R5 and send the value to P2 and the complement to P3. The program stops when the value of R5 reaches zero. 3. Write a program to add contents of 5 memory locations from location 40H onwards. The program then stores the result in R6 and sends it P2. If the final carry, after adding all of the values, equals to1 then set the bit 2AH in the memory 4. Write a program that reads a number from 8 switches connected to P2 then counts number of 1's in that number to display it as a binary number on 8 LEDs connected to 5. P3. Include a subroutine in your program to do the task of counting the 1's

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

More Books

Students also viewed these Databases questions