GPIO Flashcards

1
Q

In which circumstance would it be better to NOT use GPIO pins to communicate with a peripheral:

When you can use a built-in bus like I2C or SPI

When the peripheral specifies a very unusual custom interfacing protocol

When the peripheral is a long distance away

When the peripheral is read-only, and you can’t write to it

A

When you can use a built-in bus like I2C or SPI

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

Which of the following communication bus tells an internal module to read or to write?

Data bus

Control bus

Address bus

CPU bus

A

Control bus

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

GPIO pins can support which of the following:

Analogue output only

Analogue and digital input and output

Digital input and output

Analogue input and digital output

A

Digital input and output

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

Which of the following internal buses does the CPU use to specify which location or register it wishes to read from/write to:

USB

Control bus

Data bus

Address bus

A

Address bus

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

Most microcontrollers multiplex their GPIO pins with other functions

True
False
A

True

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

GPIO can be used to implement an SPI bus:

True
False
A

True

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

An 8-bit GPIO port must be configured to have all 8 pins as “all output” or “all input”:

True
False
A

False
most microcontrollers and devices that offer an 8-bit GPIO port allow you to configure individual pins within the port as either inputs or outputs independently. You do not necessarily have to set all 8 pins as either “all output” or “all input” collectively.

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

GPIO pins always need to be used with an external resistor:

True
False
A

False

GPIO pins do not always need to be used with an external resistor. Whether or not you need external resistors depends on the specific application and how the GPIO pin is being used.

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

In microcontrollers, GPIO stands for

A

General Purpose Input/Output

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

You would normally debounce an input key with a delay of more than 200 milliseconds

True
False
A

False
Debouncing an input key with a delay of more than 200 milliseconds is not a standard or typical practice. In fact, such a long delay would likely result in a noticeable and undesirable delay in responsiveness for the user.

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