Pre-Lab Quiz 7: Finish Save All Help

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Assessment Page 1 of 3

Pre-Lab Quiz 7

Son Lam Phung


Started: 21 July 2009 5:18 PM
Questions: 10

Finish Save All Help

1. Configuring bi-directional pins (Points: 1)

To use all of the pins of port A for input, what value should we put in register DDRA?

j a.
k
l
m
n 0x0F

j b.
k
l
m
n 0x00

j c.
k
l
m
n 0xFF

j d.
k
l
m
n 0x11

Save Answer

2. Reading data from an input port (Points: 1)

To read input data from port A, what is the C name for the register to use?

1.

Save Answer

3. Writing data to an output port (Points: 1)

To write ouput data to port B, what is the C name of the register to use?

1.

Save Answer

4. Scanning the 4x3 keypad - A (Points: 1)

Suppose that the keypad is connected to port A. What is the 8-bit pattern ######## to write
to port A when we want to check if keys on column 2 is pressed?

1.

Save Answer

5. Scanning the 4x3 keypad - B (Points: 1)

Assume that we are checking column 1 of the keypad, which is connected to port A. What bit (0

http://vista.uow.edu.au/webct/urw/lc397445277031.tp397445301031/allViewAssessm... 21/07/2009
Assessment Page 2 of 3

1, 2, ..., 7) of port A will be affected when key '7' is pressed.

1.

Save Answer

6. 7-segment display (Points: 1)

What is 8-bit pattern ######## to display digit '4' on the 7-segment display?

1.

Save Answer

7. Selecting bit-pattern for 7-segment display (Points: 1)

Select all C flow-control constructs that can be used to determine the bit-pattern to show a digit
on the 7-segment display?

c a.
d
e
f
g for

c b.
d
e
f
g switch-case

c c.
d
e
f
g while

c d.
d
e
f
g if-else

c e.
d
e
f
g do-while

Save Answer

8. C function (Points: 1)

What is the C keyword that can be used to quit a function immediately?

1.

Save Answer

9. C loop - termination (Points: 1)

What is the C keyword that can be used to terminate a loop immediately?

1.

Save Answer

10. C loop - next iteration (Points: 1)

http://vista.uow.edu.au/webct/urw/lc397445277031.tp397445301031/allViewAssessm... 21/07/2009
Assessment Page 3 of 3

What is the C keyword that can be used to force the next iteration of a loop to start
immediately?

1.

Save Answer

Finish Save All Help

http://vista.uow.edu.au/webct/urw/lc397445277031.tp397445301031/allViewAssessm... 21/07/2009

You might also like