Interfaces in Embedded Systems
Interfaces in Embedded Systems
Interface - Electronic or optical device that allows to connect two or more devices.
Interface can be parallel or serial.
RS232 is a standard for serial communication transmission of data. The diagram shows
a typical RS232 serial communication setup.
DTE (Data Terminal Equipment): Devices such as computers, teletypewriters.
DCE (Data Circuit-terminating Equipment): Devices like modems that provide a path for
data.
Data flow:
1. The teletype (DTE) sends data to the modem (DCE) using RS232.
2. The modem then sends this data over a phone line to another modem (DCE).
3. The receiving modem sends the data to another teletype (DTE) using RS232.
A shift register is used to hold the data to be transmitted or received. The shift
register takes parallel data (D0-D7) and shifts it out serially on the TxD line (for
transmission). Conversely, for receiving data, it takes serial data from the RxD line and
converts it back to parallel data.
These slides collectively illustrate the process of serial communication using RS232
standard and how UART transceivers use shift registers to manage data transmission
and reception.
Slide 57 details the UART transceiver mechanism, which can operate over an RS232
interface but does not specifically label the RS232 standard in the diagram. The
principles of serial data transmission shown in slide 57 are applicable to RS232
communication.
1. Waveform Diagram:
o The slide shows the actual waveform of the data being transmitted over
time.
o The waveform corresponds to the binary data 01001011.
2. Waveform Explanation:
o Start Bit: The transmission begins with a start bit (low voltage level).
o Data Bits: The data bits are transmitted in the following order: LSB (least
significant bit) first. In this case, the bits are 1, 0, 1, 0, 0, 1, 0, 0.
o Stop Bit: The transmission ends with a stop bit (high voltage level).
3. Voltage Levels:
oThe diagram shows different voltage levels corresponding to the mark
(high voltage) and space (low voltage).
4. Time Representation:
o The x-axis represents time, showing how the data is transmitted
sequentially.
o Each bit is transmitted for a specific duration determined by the baud
rate.
Summary:
1. Clock Signal:
o In synchronous transmission, a clock signal is sent along with the data.
o The clock signal is used to synchronize the transmitter and receiver.
2. Data Transmission:
o The data bits are sent in a continuous stream.
oThe clock signal ensures that both the transmitter and receiver are
synchronized, meaning they know exactly when to sample the data bits.
3. Example:
o The diagram shows a transmitter sending data bits (0 1 1 0 0 1 0 1 0 1 1 0
1) along with a clock signal.
o The receiver uses the clock signal to correctly interpret the timing of each
data bit.
1. Internal Clock:
o In asynchronous transmission, there is no external clock signal sent along
with the data.
o Instead, both the transmitter and receiver have their own internal clocks.
o These clocks must run at a similar reference frequency to ensure proper
timing.
2. Data Transmission:
o Data is sent in frames consisting of a start bit, data bits, and a stop bit.
o The start bit indicates the beginning of the frame, and the stop bit
indicates the end.
o The receiver's internal clock is used to sample the incoming data bits
based on the timing derived from the start bit.
3. Synchronization:
o Synchronization happens at the start of each data frame using the start
bit.
o The internal clocks of the transmitter and receiver must be calibrated to
have similar frequencies to maintain proper timing during the frame.
4. Example:
o The diagram shows a transmitter sending data bits (0 1 1 0 0 1 0 1 0 1 1 0
1) with its internal clock.
o The receiver uses its internal clock to sample and interpret the data bits
correctly, relying on the start bit for initial synchronization.
Summary
1. Null-Modem Cable:
o A null-modem cable is used to connect two DTE (Data Terminal
Equipment) devices directly without a DCE (Data Circuit-terminating
Equipment) such as a modem.
o The diagram shows the wiring connections for a DB9 female connector.
2. Pin Connections:
o Pin 2 (Rx) of Connector 1 is connected to Pin 3 (Tx) of Connector 2.
o Pin 3 (Tx) of Connector 1 is connected to Pin 2 (Rx) of Connector 2.
o Pin 5 (Signal Ground) is connected to Pin 5 (Signal Ground) of both
connectors.
o This setup allows for direct communication between two devices by
swapping the transmit and receive lines.
Slide 64: Null-Modem Cable EIA 232 with Hardware Flow Control
1. Processor Output:
o The diagram shows the logic levels used by a processor for UART
communication.
o Logic '1' is represented by +5V or +3.3V, and Logic '0' is represented by 0V.
o This is a typical CMOS or TTL logic level.
2. EIA RS232 Voltage Levels:
o The RS232 standard defines different voltage levels for signaling.
o Mark (Logic '1') is represented by a voltage between -3V and -25V
(typically -10V).
o Space (Logic '0') is represented by a voltage between +3V and +25V
(typically +10V).
o The waveform diagram illustrates the voltage levels during data
transmission.
Summary
Mobile phone interfaces with an RS232 serial port using a voltage level translator.
RS232 voltage levels (typically ±12V) are different from the voltage levels used by
modern digital devices (usually 5V or 3.3V).
MAX232: A voltage level translator for devices operating at 5V.
MAX3232: A voltage level translator for devices operating at 3.3V.
These ICs (integrated circuits) convert the voltage levels between RS232 and TTL
(Transistor-Transistor Logic) levels.
Slide 66 explains the need for voltage level translation when interfacing modern digital
devices with RS232 ports and introduces ICs like MAX232 and MAX3232 for this
purpose.
Slide 67 lists various software tools that can be used for RS232 communication,
highlighting their use in setting up and managing serial connections:
Hyper terminal
Minicom
ssh
Terminal
Summary
• These slides list the comprehensive features of the LPUART module, highlighting
its versatility, power efficiency, and robust communication capabilities.
• The features cover various aspects of UART communication, including data
configuration, flow control, error detection, and power management.
• Understanding these features can help in configuring and utilizing the LPUART
effectively for various applications requiring serial communication
Data Frame:
8-bit Word Length (M = 00): This specifies that the data frame consists of 8 data bits.
1 Stop Bit: Indicates the frame ends with a single stop bit.
Transmission Elements:
Start Bit: Indicates the beginning of a data frame.
Data Bits (Bit0 to Bit7): The actual data being transmitted.
Stop Bit: Indicates the end of the data frame.
Idle Frame: Period when no data is being transmitted.
Break Frame: Special frame to signal a break condition, often used to indicate an error
or a reset condition.
Timing Diagram:
Clock: Represents the timing signal used to synchronize data transmission.
Data Frame: Shows the sequence of bits (start bit, data bits, stop bit) transmitted over
time.
Idle and Break Frames: Illustrate periods of no data transmission and break conditions.
FIFO (First In, First Out) – a linear buffer, the opposite structure to stack. The first
element placed into FIFO is immediately transferred to the end of the queue. Therefore
the first element stored in FIFO is supposed to be processed first.