Question

Write an assembly code to do the following noting that the used microprocessor is MC68k:

Use a 7-segment display and a set of current lining resistors (330 to 470 Ohm) in a common anode configuration with the outpu

The 7-Segment Display:

g f Com a b e d Com Dp

Use a 7-segment display and a set of current lining resistors (330 to 470 Ohm) in a common anode configuration with the output port of the VIA to display the value of the switch (For example, if the switch is set to [ON OFF OFF ON] then display9) The show goes like this: on power up, you have to show a count down from 9 to 0 at one Hertz rate, then display the value of the witch as it changes
g f Com a b e d Com Dp
0 0
Add a comment Improve this question Transcribed image text
Answer #1

$MOD51
org 0000H
MAIN:
MOV p3, #080H
ACALL LABEL
MOV P3, #0B9H
ACALL LABEL
MOV P3, #034H
ACALL LABEL
MOV P3, #030H
ACALL LABEL
MOV P3, #019H
ACALL LABEL
MOV P3, #012H
ACALL LABEL
MOV P3, #003H
ACALL LABEL
MOV P3, #0B8H
ACALL LABEL
MOV P3, #000H
ACALL LABEL
MOV P3, #018H
SJMP MAIN
LABEL:MOV P1, #0C0H
ACALL DELAY
MOV P1, #0F9H
ACALL DELAY
MOV P1, #0A4H
ACALL DELAY
MOV P1, #0B0H
ACALL DELAY
MOV P1, #099H
ACALL DELAY
MOV P1, #092H
ACALL DELAY
MOV P1, #082H
ACALL DELAY
MOV P1, #0F8H
ACALL DELAY
MOV P1, #080H
ACALL DELAY
MOV P1, #090H
ACALL DELAY
RET


DELAY: MOV R0, #0FFH
LABEL1: MOV R1, #0FFH
LABEL2: MOV R2, #07H
LABEL3: DJNZ R2, LABEL3
DJNZ R1, LABEL2
DJNZ R0, LABEL1
RET;
END

Add a comment
Know the answer?
Add Answer to:
Write an assembly code to do the following noting that the used microprocessor is MC68k: The 7-S...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT