Module 6 Flashcards

1
Q

What is parallel vs serial?

A

Parallel
- Multiple inputs taken at the same time
Serial
- Inputs taken on one line piece by piece

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

Big and Little Endian

A

Big Endian (normal)
- Stores the MSB first
Little Endian (weird)
- Stores the LSB first

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

Asynchronous vs Synchronous

A

Async has an agreed upon time for comms to take place in (UART) while sync is dependent on clock timers.

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

Simplex, Half Duplex, Full Duplex

A

Simplex
- One device Rx, one device Tx and the communication only goes from Tx to Tx

Half Duplex
- Both devices can Rx and Tx but there is only one comms channel

Full Duplex
- Both devices can Rx and Tx and there are two comms channels so that this can happen at the same time

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

What is the basic message structure

A

Start -> data -> stop

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

What is parity and how does the parity bit work

A

Parity is the number of 1s in a message.

Odd parity means there must be an odd number of 1s in the entire message (including the parity bit itself)

Even parity means there must be an even number of 1s in the entire message.

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

I2C Features and Operation

A

Half duplex
+ Simple, robust, cheap
+ Can have multiple masters and multiple slaves
- Use of ACK and NACK creates large overheads

Has features of arbitration and clock stretching
- Arbitration occurs when a two masters race to hold a line low. Whichever wins then gets to communicate
- Clock stretching occurs when a master holds the clock line low for longer than required to process more data.

Makes use of two wires, SCL and SDA.
- SCL is the clock
- SDA is the data line

The Transmission Process:
IDLE: Both SDA and SCL are high
START: SDA goes low while SCL remains high
STOP: SDA goes high while SCL remains high

The process then goes:
START -> ADDRESS -> RW -> DATA -> ACK and repeat
ACK = 0 and NACK = 1

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

SPI Features and Operation

A

4-wire full duplex system
!CS, MISO, MOSI, CLK

The master has control over the !CS which is active low and is used to connect to the slaves. There are two options for each of the SPI things: CPOL and CPHA

CPOL defines the clock: 0 means active low and 1 means active high

CPHA defines when signals are read based on the clock: 0 means read on the leading edge and 1 means read on the trailing edge

These two are often defined in SPI modes ranging from 0 to 3.

The master will pull !CS low to select a slave and communicate using it’s MOSI line. The slave will then respond with the MISO line simultaneously.

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

UART Features and Operation

A

UART is full duplex. UART is asynchronous - both devices require the same baud rate which is defined in 2^n * 150 regions.

The Rx and Tx lines start high. The default time unit is T which is equal to 1/BR. The Tx line is then pulled low for 1.5T s. Rx and Tx will the communicate using signals timed at 1T s until Tx goes high for 1.5T, at which point comms stop.

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

RS232 Features and Operation

A

RS232 sucks and no one likes it. It is full duplex and asynchronous like UART

Uses -3V to -15V as logic high and +3V to +15V as logic low. A MAX232 chip can be used to convert the [-3V,-15V] to 3.3V and [+3V,+15V] to 0V for comms with the STM32F0.

Only allows one transmitter bus and one receiver bus. Can only transmit over distances about 15m.

RS485 can transmit over 1200m and uses twisted cables to prevent interference.

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