Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use adressing program for IDE app to solve this problem Using the BSET instruction, initialize the DDR for Port S ( address $ 2 4

Use adressing program for IDE app to solve this problem
Using the BSET instruction, initialize the DDR for Port S (address $24A).(Normally you would use movb, or ldaa then staa. How can you initialize it with bset?)
Using either the BRSET or BRCLR instruction, write a program that waits for switch 1(aka bit 0[70]) to go low, then high - then lights LED 6[81 context](Using either the BSET or BCLR instruction).
Put a NOP instruction at the end of the program. Set a breakpoint here to stop the program after the wait loop so you can check that it worked correctly.
Test the program. IT SHOULD WORK WHEN RUNNING CONTINUOUSLY (green arrow)! Whether switch 1(bit 0) is low or high when the program begins, it should not reach the NOP instruction unless the following progressions occur:
When the program starts with switch high, lights only turn on after switch goes low then high (2 flips).... But then the program starts with switch low, it must go high, low, then high again (3 flips) before the LED lights up.
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

Students also viewed these Databases questions