SES Flashcards

1
Q

What is a bus?

A

A communication highway shared by multiple devices

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

What are some challenges of using busses?

A

Maintaining synchronisation between devices
Differentiating between valid bits and an idle signal (when no data is being sent)
Knowing if a device is the intended recipient
Detecting message collisions
Prioritising senders

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

What is the solution to mismatched signals in busses?

A

The master controls the clock and sends it to the slave

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

What are the common communication protocols for microcontrollers?

A

RS232
I2C
SPI

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

What are the features of RS232?

A

Asynchronous

One wire is used for transmitting and another for receiving

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

Describe how an asynchronous serial bus functions

A

The sender doesn’t provide a clock to the receiver
Universal asynchronous receiver transmitter (UART) manages the transfer
Both ends must apply the same protocol

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

What are parts of a protocol?

A
Number of bits in the message
msb or lsb first
synchronisation of bits
parity bits
baud rate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How many wires are there in the I2C protocol?

A

2

serial data line (SDA) & serial clock line (SCL)

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

Briefly describe the I2C protocol

A

All communication is initiated by the master
In order to transmit to the slave the master must send the slave’s unique address
To receive data the master must send a read request alongside the slave’s address
For every 8 data bits an ‘ACK’ bit must be returned

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

Describe a multi-master I2C system

A

It must be decided which master has control of the bus
If a master tries to transmit a 1 but the wire has value another master must be sending
The master that lost the resolution stops sending

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

What does SPI stand for?

A

Serial Peripheral Interface

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

Describe the SPI protocol

A

Shift registers form a circular buffer
Data can be transferred in either direction using 2 pins
MISO - master in slave out
MOSI - master out slave in
Only the master can initiate a transfer
The SS (slave select) pin defines which slave should respond to a transaction so the master needs an SS pin for each peripheral
Alternatively slaves can be chained and all participate in transactions

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

What are the advantages of SPI?

A

High speed
No overhead
Full duplex

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

What are the disadvantages of SPI?

A

Master doesn’t know is slaves are online
Master doesn’t know if the data is received
At least 4 wires required
Multi-master is awkward

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

What are the advantages of I2C?

A

The master knows if data has been received
The master knows if slaves go offline
Only 2 wires required
Multi-master is easy to implement

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

What are the disadvantages of I2C?

A

Low speed
High power drain
Half duplex

17
Q

What are the features of volatile memory?

A

Requires power to maintain stored data
Contents is lost when it’s switched off
At switch on the memory contains no useful data

18
Q

What are the features of non-volatile memory?

A

Retains data when even when not powered
Contents preserved at switch off
At switch on contents is the same as at switch on

19
Q

What is EEPROM?

A

Non-volatile memory
Field programmable
Re-programmable
Individual bytes can be erased

20
Q

What is flash memory?

A

Non-volatile memory
Blocks (large) can be erased
Cheaper than EEPROM
Faster to program than EEPROM

21
Q

Describe Von-Neumann architecture

A

One memory and one address but between a processor and memory
Instructions and data are sent sequentially which limits operation bandwidth

22
Q

Describe Harvard architecture

A

Uses separate memories for instructions and data with different busses
Instructions and operands are fetched in parallel
Different program and data bus widths can be used to optimise the memories

23
Q

What are the requirements of a system?

A

An informal description is what the customer wants

24
Q

What is the specification of a system?

A

Precise description of what the design team should deliver

25
Q

What methods are there to debounce a switch?

A

Hardware (resistor capacitor circuit & Schmitt trigger)

Software

26
Q

How does hardware debouncing work?

A

Resistor capacitor circuit

  • voltage rises when capacitor is charged through a resistor
  • when the switch opens the resistors and capacitor smooths the bounce
  • when the switch closes the capacitor discharges and R2 ensures the voltage change is slow

Schmitt trigger

  • squares up waveform
  • changes state only when threshold is reached
27
Q

How does software debouncing work?

A

Input signal is sampled across several reads over several milliseconds
The input is only considered high or low if the input has been sampled for a certain time in the new state

28
Q

Describe complex instruction set computer (CISC)

A

Instructions can be any length
Instructions can be any format
Instructions can take any number of clock cycles to complete
Difficult for pipelines to handle

29
Q

Describe reduced instruction set computer (RISC)

A

Instructions are one word long
Instructions have a similar format
Instructions take one clock cycle to complete

30
Q

What is the sampling theorem?

A

A digital signal shouldn’t contain frequencies greater than half the sampling frequency (Nyquist frequency)
Signals containing frequencies above the Nyquist frequency suffer from aliasing which means continuous signals become indistinguishable
The Nyquist rate is the maximum rate for reconstructing a continuous signal

31
Q

What are PWMs used for?

A

Giving a pseudo-analog signal from a digital pin

Allows for speed control of motors etc

32
Q

How does pulse width modulation (PWM) work?

A

The voltage is pulsed very quickly and if an external device has a response time less than the frequency of the PWM it will only see the average voltage.
The duty cycle is used to change the average voltage by changing the percentage of time the voltage is high

33
Q

What are the three power saving modes?

A

Active mode
Idle mode
Sleep mode

34
Q

What is the difference between idle and sleep mode?

A

Idle - CPU isn’t clocked but peripherals are

Sleep - neither the CPU or peripherals are clocked

35
Q

What is the difference between a microcontroller and a microprocessor?

A

Microprocessor: Contains the CPU, processes instructions and connects to external devices for other functions. One part of a system that forms a computer.
High speed processing of large data sets at the cost of a high current drain.

Microcontroller: A chip that contains all systems needed to form a computer –> a computer on a single chip.
Low speed processing of small data sets, good current control/battery lifetime. Inbuilt peripherals.

36
Q

What is the equation for the guarantee bound of schedulability?

A

n*(2^1/n - 1)