Synchronous and Asynchronous Serial Communication Flashcards
What is the basic definition of asynchronous serial communication?
Sender doesn’t provide a clock
Transfer managed by UART (universal asynchronous receiver transmitter)
Both ends must apply same message protocol
What is the baud rate?
No. symbols sent per second
bit rate > baud rate
1 symbol can represent multiple bits
simplest form is 1 symbol = 1 bit (0 or 1)
What is the format of a message?
Baud rate 1 start bit 5-9 data bits Parity bit (none, odd, even) 1-2 stop bits
e.g. 9600 8-N-1
What is the parity bit?
Used to determine whether a message has been transmitted/received correctly.
Counts the no. 1s in a message and adds a 1 to make the count either odd or even (depending on protocol chosen)
What is a UART and how does it work?
Universal Asynchronous Receiver Transmitter
Exchanges parallel data with a data bus and converts to/from serial form.
What are the 5 challenges of busses?
Maintaining synchronisation Differentiating between valid bits and an idle line Knowing the intended recipient Message collisions Establishing priority
Describe serial peripheral interface
Shift registers form a circular buffer
Data can be transmitted in either direction using MISO and MOSI pins
How is a message transmitted using SPI?
The master sends a request and activates the clock for enough cycles for the slave to transfer
How does SPI deal with multiple slaves?
The master will have a slave select pin for each slave
OR
All slaves are daisy-chained and all slaves participate in all transactions
What are the advantages and disadvantages of SPI?
\+ full duplex \+ simple \+ good for high data connections - requires 3+n pins for n slaves - multi-master is awkward
Describe inter integrated circuit
Two wires, the serial data line (SDA) and serial clock line (SCL) are required.
Devices can drive a zero onto the wire, when no devices are driving the wire is high
How are messages transmitted using I2C?
The master sends the slave’s address with a read/write bit.
For every 8 bits sent an ACK must be returned
How are the lines effected by sending a message using I2C?
start (SDA high -> low, SCL high)
address and read/write (8 bits then ACK)
data (8 bits then ACK)
stop (SDA low -> high, SCL high)
How does I2C deal with multi-master?
Arbitration:
if a master tries to transmit a 1 and the line is low another master is transmitting and it stops sending
What are the advantages and disadvantages of I2C?
\+ ACKs mean masters know if data is received \+ only requires two wires \+ multi-master is easy to implement - low speed - high power drain - half duplex - includes overheads