Lecture 15 - Interfaces Flashcards
What is a parallel transmission standard?
- 8 bit concurrently → parallel
- on µC: use digital I/O lines or add special interface chip
- Bi-directional send and receive over the same lines
- Half-duplex either send or receive,
but not both at the same time - Send 8 data bits concurrently
→ usually faster than serial transmission - Requires additional control lines
→ use flat ribbon cable - Can only be used over a limited distance
~ 1-2 m
What is a print routine and handshakes?
Refer to slides
What is parity for parallel transmission?
- Is a method of detecting errors in data transmission
- Typically a single byte parity checksum is transmitted after a block of bytes (e.g. several KB of data)
- Checksum calculation is: ( transmitted bytes) MOD 256
- Receiving side calculates checksum for transmitted data bytes and compares with transmitted checksum
- Parity generators and checkers can be implemented in software or hardware
What is a serial transmission standard?
- 8 bits consecutively → serial
- on µC: use 2 digital I/O lines or built-in interface chip
- Bi-directional send and receive over different lines
- Full duplex send and receive at the same time
- Send single bit at a time
– usually slower than parallel transmission, but technology gets faster - Minimal configuration has only 3 wires (Transmit, Receive, Ground)
– Maximum cable length about 20 m (longer than parallel transmission)
– Optional: additional control lines - Handshake
– Software (special control characters XON, XOFF)
– Hardware (requires 2 additional lines)
– None (may not detect transmission errors) - Can be used over telephone (2 wires)
– then only in half duplex (send - listen - send - listen - …)
What are some examples of serial connections (serial transmission)?
Serial Connections
* RS232C standard (slow) serial connection
e.g. used on all PCs
→ will be discussed here
* RS422 fast serial bus using differential data lines:
Tx+,Tx-, Rx+,Rx- (e.g. original Macintosh)
* USB Universal Serial Bus (high speed serial connec.) today’s standard for PCs and Macs
REFER TO SLIDES FOR SPECIFICS
What are signals in reference to RS232C serial connections?
- Voltages: +12V (high), -12V (low)
- Not TTL compatible (transistor-transistor-logic: 5V, 0V)
– requires additional chip for voltage conversion
e.g. Maxim Max232
– or system needs power supply with 3 different voltages:
+12,-12,+5 - Relatively simple for system with mains power supply
- Requires more conversion hardware for embedded system
- Idle state of line: “high
What is the order of transmission for RS232C?
a) 1 start bit (low)
b) 7 or 8 Bit, LSB first (least significant bit) basic ASCII code is only 7 bits, so this saves transmission time
c) 1 Parity bit (odd/even) or none
for transmission error detection
d) 1 or 2 stop bits (high)
e) Line remains idle until next byte is sent
What is the data transmission rate for RS232C?
Data Transmission Rate
* Measure in bits per second (bps)
* For binary signaling, bits-per-second (bps) equals the Baud rate (bd), measured in symbols per second
* Typical Baud rates:
1’200, 2’400, 4’800, 9’600, 19’200, 38’400, 57’600, 115’200, …
What is parity for serial transmission?
- A method of detecting errors in data transmission
- Each data byte (8 bits) gets one additional bit appended
- Algorithm for Odd Parity [Even Parity is analog.]
– Count the number of 1s in a byte
– If this number is odd, then append ‘0’, else append ‘1’ - Examples:
1001 0110 has 4‘1’ (even number) → 1001 0110 1
1001 1110 has 5‘1’ (odd number) → 1001 1110 0 - Parity generators and checkers can be implemented in software or hardware
What is the general understanding of parity?
- The effect of odd parity is that the sequence of 9 bits (8 data bits + 1 parity bit) has always an odd number of 1s
- This property can be used to check whether a byte has been transmitted correctly
- Examples:
1001 0110 1 →transm. 1001 0110 1 has odd number of 1s ➔ OK
1001 0110 1 →transm. 1001 0100 1 has even number of 1s ➔ Error - Only single bit errors can be detected
- The parity bit will be stripped after transmission
EXAMPLES OF RS232C
REFER TO SLIDES