Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Fill in the blank to get 0x36 on PORTB. unsigned char BCD_Byte = 0x67; unsigned

ID: 2989522 • Letter: F

Question

Fill in the blank to get 0x36 on PORTB.

            unsigned char BCD_Byte = 0x67;
            unsigned char x;
            x= BCD_Byte & 0xF0;
            _____;
            PORTB = x | 0x30; (Points : 8)       

       A. x=x>>4;
       B. x=x>>2;
       C. x=x<<4;
       D. x=x<<2;

ORG

$8000

LDS

#$4000   

LDAA

#$FF

STAA

DDRB

BACK

BSET

PORTB,%00000001

JSR

DELAY

BCLR

PORTB,%00000001

JSR

DELAY

JSR

DELAY

BRA

BACK

The following program creates square wave pulses on PB0. What is the duty cycle?

ORG

$8000

LDS

#$4000   

LDAA

#$FF

STAA

DDRB

BACK

BSET

PORTB,%00000001

JSR

DELAY

BCLR

PORTB,%00000001

JSR

DELAY

JSR

DELAY

BRA

BACK

      A. 75%
       B. 66%
       C. 33%
       D. 25%

Explanation / Answer

(TCO 8) The following program creates square wave pulses on PB0. What is the duty cycle?

ORG

$8000

LDS

#$4000

LDAA

#$FF

STAA

DDRB

BACK

BSET

PORTB,%00000001

JSR

DELAY

JSR

DELAY

BCLR

PORTB,%00000001

JSR

DELAY

BRA

BACK

66%

8. (TCO 8) Fill in the blank to get 0x36 on PORTB.

unsigned char BCD_Byte = 0x67;
unsigned char x;
x= BCD_Byte & 0xF0;
_____;
PORTB = x | 0x30; (Points : 8)


x=x>>2;

ORG

$8000

LDS

#$4000

LDAA

#$FF

STAA

DDRB

BACK

BSET

PORTB,%00000001

JSR

DELAY

JSR

DELAY

BCLR

PORTB,%00000001

JSR

DELAY

BRA

BACK

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote