Lecture 1 Flashcards

1
Q

How would you use inline assembly coding to create a delay of one CPU clock cycle?

A

asm volatile (“nop”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

C keyword to quit a function immediately

A

Return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

C keyword to terminate a loop immediately

A

Break

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

C keyword for forcing the next iteration of a loop to start immediately

A

Continue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How many bits in a char

A

8

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many bits in an int

A

16 bits

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How many bits in a long int

A

32

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the data direction register do?

A

Used to configure port pins as input or output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the port register (PORTx) do?

A

Used to write output data to port

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does the input pin address (PINx) do?

A

Used to read data from port

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the role of the header file

in a C program?

A

Contains All the register definitions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly