ECET 330 DeVry Final Exam
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
o<br />
PORTB = PORTB & 0x0F;<br />
Question 8.8.(TCO 8) The following program creates square wave pulses on PB0. What is the duty cycle?<br />
ORG $8000 LDS #$4000 LDAA #$FF STAA DDRB BACK BSET PORTB,%00000001 JSR DELAY JSR DELAY BCLR<br />
PORTB,%00000001 JSR DELAY JSR DELAY BRA BACK (Points : 8)<br />
o 75%<br />
o 66%<br />
o 50%<br />
o 25%<br />
Question 9.9.(TCO 8) Find the value for PORTB after the execution of the following code: PORTB = 0x55 ^ 0xFF;<br />
(Points : 8)<br />
o<br />
o<br />
o<br />
o<br />
PORTB = 0x05<br />
PORTB = 0x0A<br />
PORTB = 0xAA<br />
PORTB = 0xFF<br />
Question 10.10.(TCO 8) Fill in the blank to get 0x38 on PORTB. unsigned char BCD_Byte = 0x89; unsigned char<br />
x; x = BCD_Byte & 0xF0; _____; PORTB = x | 0x30; (Points : 8)<br />
o<br />
o<br />
o<br />
o<br />
x=x>>4;<br />
x=x>>2;<br />
x=x