GPIO Flashcards

1
Q

What are I/O registers?

A

addresses associated with I/O devices

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

What is a driver?

A

Software that communicates with an I/O device. Other programs call functions in the device driver to access the device without having to understand lower-level hardware

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

What is an embedded I/O system?

A

a programmed controller (comp./microcont.) with a dedicated function within a larger mechanical/electrical system, often with real-time computing constraints

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

What does an embedded I/O system usually include?

A
  • input device (peripheral)
  • controller (computer/microcontroller)
  • output device (peripheral)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MCU - GPIO

A
  • used to write/read digital signals
  • requires registers to read input, pin values, write output in values and set directions of the pin
  • requires configuration registers (interrupts, pin type, rising falling edge)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the purpose of an I/O interface?

A

To manage communication between peripherals and the computer. It resolves differences between the peripherals and CPU

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

What are the four major differences between peripherals and computers?

A

1) data format in peripherals, word format in CPU and memory
2) operating modes of peripherals differ, must be controlled
3) peripherals are often electromechanical devices which operate differently from CPU and memory (electronic devices), therefore conversion signals may be required
4) data-transfer rate of peripherals and clock rate of CPU, synchronisation required

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

What are interface units?

A
  • special hardware components between the CPU and peripherals which supervise/synchronise all input and output transfers
  • interface between CPU bus and peripherals
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of the clock?

A
  • synchronises all data transfer

- generates signal for timers, PWM and other peripherals

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

Give two clock sources

A
  • mechanical resonant devices such as crystals or ceramic resonators
  • RC oscillators
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of prescaling?

A
  • used to divide the clock seed the timer as it is too high for counter register (16 bit) to hold
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Auto Reload Reigster (ARR)

A
  • further divide system clock to give timer frequency

- counter counts up to value in ARR before reloading

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

pulse width

A

“on time”

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

duty cycle

A

pulse width divided by period

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

What is the Capture Compare Register (CRR)?

A
  • compared to counter and raises a signal when equal
  • one CRR for each channel
  • used to change pulse with
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens when an external interrupt is raised?

A

The MCU stops its current task, branches to an ISR which gets executed, then returns to previous task

17
Q

What are the different standards for Serial I/O

A
  • SPI
  • UART (RS 232/485)
  • I2C
18
Q

Describe SPI

A

Interface requires three lines minimum:

  • SCK
  • MOSI
  • MISO
  • CE/CS which can be used to select a peripheral
19
Q

Describe an SPI transmission:

A
  • master (MCU) produces clock signal
  • master initiates communication with series of clock pulses
  • master puts data on MOSI starting with m.s.b (sending)
  • slave puts data on MISO (receiving)
20
Q

Describe UART

A
  • communication without a clock, therefore devices aren’t synchronised (asynchronous)
  • system agrees on data rate, each device generates its own clock
  • slower than SPI
  • protocols include RS-232 and RS-485
21
Q

What is the purpose of the parity bit in RS-232 protocol for UART? How does it work?

A
  • used to detect data corruption
  • configured as even or odd
  • for even parity, parity bit is chosen so total collection of data (incl. parity bit) has an even number of 1’s
  • receiver checks if even number of 1’s was received and signals an error if not
  • odd parity is reverse
22
Q

What is Baudrate (RS-232 protocol)?

A
  • signalling rate measured in symbols/sec
  • multi-level signalling (multiple bits per symbol)
  • 2-level signalling (each symbol represents a bit)
23
Q

RS-485 protocol for UART

A
  • does not define a protocol, defines an electrical interface
  • uses differential signalling to enable data transmission over long distances
  • noise rejection
24
Q

Describe I2C

A

interface requires two lines, one for bidirectional data signals (SDA), one for the clock signal (SCK). Bus drivers are open drain, can pull signal line low but not drive it high, so each signal line requires a pull-up resistor

25
Q

Explain how an I2C transmission occurs

A
START CONDITION:
- master leaves SCL high
- pulls SDA line low
- generates clock pulses
ADDRESS FRAME:
- always sent first for new communication
- 7 bit address (m.s.b first)
- R(1) or W(0) bit indication
DATA FRAME:
- sent based on R/W
- length is arbitrary
STOP CONDITION:
- SCL pulled high
- SDA pulled high
26
Q

High speed serial:

A
  • encoded data containing both data and clocking info sent in a single differential signal
  • speeds up to 10 Gbps