Memory Mapped I/O Flashcards

1
Q

What are the control registers

A

Control registers are flip flops which can be used for reading/ writing AND connected to other circuits

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

What are the two methods for a CPU to interact with the control registers

A

I/O instructions included in the processors instruction set
Memory Mapped I/O, registers with addresses reserved in memory space

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

What are some factors which affect the choice between using memory mapped I/O and using I/O instructions

A

The size of the address space
The addressing mode
The size of the instruction set
Any caching complications

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

C assumes Von-Neumann Architecture (single address space), but Memory mapped IO contradicts this by having registers separate to RAM, how can we get around this

A

We can use a offset for the start of the address space such that C views it as one big address space

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

What type should unsigned, 8 bit registers be represented with in c

A

uint8_t

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

What does the _BV(bit) macro do

A

The _BV(bit) macro allows for a byte value with a singular bit in the set position set

#define _BV( bit ) ( 1<<(bit))

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

What does register |= _BV(2); do

A

Sets bit 2 in register to true

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

What does register &= ~(_BV(2)); do

A

Sets bit 2 in the register to false

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

What does register ^= _BV(2); do

A

Toggles bit 2 in the register

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