Batch 9 VIS
Batch 9 VIS
A PROJECT REPORT
Submitted by
KEERTHANA.T(210416105019)
NALLAMMAL.P(210416105023)
ROOBIKA.S (210416105030)
of
BACHELOR OF ENGINEERING
in
CHENNAI 600069
1
ANNA UNIVERSITY : CHENNAI 600 025
BONAFIDE CERTIFICATE
SIGNATURE SIGNATURE
2
ACKNOWLEDGEMENT
First of all,we bow our heads to the God Almighty for his everlasting grace in all
our endeavors.
It is a pleasure to thank the people who have made this project possible and have
given their encouragement , assistance and support throughout the whole process
of the completion of our project at Chennai Institute of Technology,Kundrathur.
3
We are blessed to have the help and kindnss of our class mates.words cannot
adequately express our appreciation for their patience, understanding and
unconditional support during difficult times and their invaluable help in formatting
this project.
4
ABSTRACT
The objective of this project is to develop a device which should convert the data
which should convert the data that is sent in RS232 (Recommended Standard ) bus.
The LIN (Local Interconnect Network) bus is similar to CAN (Controller Area
Network) bus . The CAN bus is very costly.So, in non-vital areas of the vehicle
such as sunroof or window control and etc. they use LIN bus to reduce the cost .
On comparing to CAN , the LIN bus is a single wire system which supports single
master medium access control and its transfer rate is slow and it has 6-bit identifier
message routing and 8-bit checksum error checking . They need to be connected to
the respective data pins of the LIN bus.
5
TABLE OF CONTENTS
ABSTRACT iv
LIST OF TABLES ix
LIST OF ABBREVIATIONS x
1. INTRODUCTION
1.1 GENERAL 12
1.2 LITERATURE REVIEW 13
1.3 EXISTING SYSTEM 15
1.3.1 DRAWBACKS OF EXISTING SYSTEM
1.4 PROPOSED SYSTEM 16
1.4.1 ADVANTAGES
1.5 OBJECTIVES 17
2. PROPOSED SYSTEM
2.1 INTRODUCTION 18
2.2 CAN BUS 21
2.3 LIN BUS
2.4 DIFFERENCE BETWEEN CAN BUS LIN BUS 23
2.5 BLOCK DIAGRAM AND ITS EXPLANATION 24
3. HARDWARE REQUIREMENTS
6
3.1 LOGIC ANALYSER 26
3.11 OPERATION 26
3.12 CHARACTERISTICS 27
3.13 ADVANTAGES 28
3.21 FEATURES 30
3.23 APPLICATIONS 32
3.31 FEATURES
3.32.2 REGISTERS 36
3.41 ARCHITECTURE 40
3.43 APPLICATIONS 42
7
3.51 IMPLEMENTATION
3.53 COMPARISON 47
3.54 APPLICATION
4. RESULT ANALYSIS 48
5. REFERENCES 49
8
LIST OF FIGURES
4 Block diagram 25
5 LIN TRANSCEIVERS 29
6 LIN TRANSCEIVERS 31
7 LCD module 35
8 pin diagram 37
9 Architecture 40
11 voltage levels 41
9
LIST OF ABBREVIATIONS
13 IC – integrated circuit 27
10
17 OLED – Organic Light Emitting Diodes 35
24 GND Ground 42
11
LIST OF TABLES
12
CHAPTER 1
INTRODUCTION
1.1 GENERAL
13
The CAN bus is very costly so in non-vital areas of the vehicle such as sunroof
or window control they can use LIN bus to reduce the cost . on comparing to CAN
bus system , the LIN bus is a single wire system which supports single master
medium access control and its transfer rate is slow and it has 6- bit identifier
message routing and 8-bit error checking . They need to be connected to the
respective data pins of the LIN bus.
The Local Interconnect Network (LIN) bus was developed to create a standard for
low-cost, low-end multiplexed communication in automotive networks. Though
the Controller Area Network (CAN) bus addresses the need for high-bandwidth,
advanced error-handling networks, the hardware and software costs of CAN
implementation have become prohibitive for lower performance devices such as
power window and seat controllers. LIN provides cost-efficient communication in
applications where the bandwidth and versatility of CAN are not required. You can
implement LIN relatively inexpensively using the standard serial universal
asynchronous receiver/transmitter (UART) embedded into most modern low-cost
8-bit microcontrollers.
The literature review explains the themes of the research questions of different
project which is based on “RS232 to LIN converter”
More and more microcontrollers are embedded in a large area of products from
industrial to domestic domains. A good example is the automobile, a modern one
containing tens of microcontrollers. As their number increased the communication
between them became necessary. The serial solution was preferred and a lot of
serial buses and protocols were developed optimizing different parameters of the
communication. Several examples are: RS232, LIN, SPI, CAN and so on.
Monitoring serial communications is necessary in R&D phase, e.g. for creating
virtual transfer partners, and in testing and debugging phases.
Many microcontrollers contain the LIN and SPI buses and almost all of them
include the RS232 bus. The created tools work in passive mode, monitoring the
14
transfers and sending the data to a PC or in active mode (only for the LIN bus),
interfering in the communication and sending headers, responses or injecting
typical errors.
15
know how to detect and respond to events at a USB port and it has to provide a
way for the device to store data to be sent and retrieve data that have been received
UART consists of different blocks which handle the serial communication through
RS232 protocol. There are a set of control registers to control the data transfer. The
interface FIFO logic has FIFO to bridge the data rate differences between USB and
RS232 protocols.
16
connect access control, security and environmental systems. Typical places to pick
up CAN include the ABS system (look for a pair of twisted wires, but ignore the
four wheel speed wires) or on the back of the dashboard (look for a pair of twisted
wires)
17
network that is used for infotainment systems. The very quick Ethernet connection
is being proposed for infotainment and display applications in the car—and maybe
more.
1.4.1 ADVANTAGES
The LIN bus is generally cheaper than the CAN bus to implement.
A small and relatively slow in-vehicle communication and networking serial bus
system, LIN bus is used to integrate intelligent sensors and actuators, such as air
conditioning systems, door locks, and seat motors. The LIN bus is most useful
when controlling systems that don't require very much information too quickly.
A primary advantage of this bus is that it can be implemented with a single wire
(using the vehicle chassis as a current return path). The system can only send one
command over the line at a time. The maximum command size is 8 bytes, which
can be transmitted every 10 ms, but commands of 2 bytes or 4 bytes can be sent
every 5 ms. The LIN bus can also communicate over a vehicle's power distribution
system with a DC-LIN transceiver. The LIN Bus uses a master/slave interface. The
master sends out a message identifying the slave, and the slave responds. Slaves
can only respond when the master sends out a call for a response, and each slave
has a unique identifier.
1.5 OBJECTIVES
The LIN bus is similar to CAN bus. The CAN bus is very costly so in non-
vital areas such as sunroof or window control etc…
They use LIN bus to reduce the cost .LIN bus is a single wire system which
supports single master medium access control
To develop a device which should convert the data that is sent in
RS232(Recommended Standard) bus
To convert the RS232 data into LIN bus data to avoid the voltage imbalance
between the two buses or else data transfer wont take place
To display the final data on an LCD display module in a user-readable form.
18
CHAPTER 2
PROPOSED SYSTEM
2.1 INTRODUCTION
Can bus is the most commonly used serial transfer bus which is used to
transfer signals due to increase cost of CAN bus , the LIN bus is used.
The LIN bus can be used as a alternative to CAN bus and it can be used
in non-vital areas of the car such as sunroof and windshield.
In an automotive CAN bus system, ECUs can e.g. be the engine control unit,
airbags, audio system etc. A modern car may have up to 70 ECUs - and each of
them may have information that needs to be shared with other parts of the network.
19
Fig 2.2.1 Automotive CAN bus system
In short, the Controller Area Network (CAN) is a standard used to allow Electronic
Control Units (ECUs) to communicate in an efficient manner without a central
computer. Messages are broadcast in a system that requires very little physical
wiring making CAN bus low cost, robust and efficient. Applications of the CAN
protocol include in particular automotive (cars, trucks, buses, commercial vehicles
etc.), but also e.g. boats, drones and industrial automation.
Low cost: ECUs communicate via a single CAN interface, i.e. not direct analogue
signal lines, reducing errors, weight, costs
Centralized: The CAN bus system allows for central error diagnosis and
configuration across all ECUs
Efficient: CAN messages are prioritized via IDs so that the highest priority IDs are
non-interrupted (key in e.g. vehicles)
Flexible: Each ECU contains a chip for receiving all transmitted messages, decide
relevance and act accordingly – this allows easy modification and inclusion of
additional nodes (e.g. CAN bus data loggers) – cf. below figure
20
CAN bus uses two dedicated wires for communication.The wires are called CAN
high and CAN low. When the CAN bus is in idle mode, both lines carry 2.5V.
When data bits are being transmitted, the CAN high line goes to 3.75V and the
CAN low drops to 1.25V, thereby generating a 2.5V differential between the lines.
Since communication relies on a voltage differential between the two bus lines, the
CAN bus is NOT sensitive to inductive spikes, electrical fields or other noise. This
makes CAN bus a reliable choice for networked communications on mobile
equipment.
CAN power can be supplied through CAN bus. Or a power supply for the CAN
bus modules can be arranged separately. The power supply wiring can be either
totally separate from the CAN bus lines (using suitable gauge wiring for each
module) resulting in two 2-wire cables being utilized for the network, or it can be
integrated into the same cable as the CAN bus lines resulting in a single 4-wire
cable. CAN bus cabling is available from multiple vendors.
21
technologies, which led to compatibility problems. The LIN specification was
designed to allow very cheap hardware-nodes being used within a network. It is a
low-cost, single-wire network based on ISO 9141.[11] In today’s car networking
topologies, microcontrollers with either UART capability or dedicated LIN
hardware are used. The microcontroller generates all needed LIN data (protocol ...)
(partly) by software and is connected to the LIN network via a
LIN transceiver (simply speaking, a level shifter with some add-ons). Working as a
LIN node is only part of the possible functionality. The LIN hardware may include
this transceiver and works as a pure LIN node without added functionality.
.
22
Typical applications for the LIN bus are assembly units such as doors, steering
wheel, seats, climate regulation, lighting, rain sensors etc. The cost-effective nature
of LIN allows for the introduction of mechatronic elements such as actuators,
smart sensors, or illumination; all of which can be easily connected to the in-car
network and become accessible to all types of services and diagnostics. When
asking where the LIN network protocol can be used, one can easily see the
possibilities are nearly endless. The first LIN enabled vehicles have already proved
success since its introduction in 2001. While the LIN specification is still in its
infancy, it is expected that the number of LIN nodes will grow rapidly to 20 per
vehicle over the next decade; a volume of about 1.2 billion nodes worldwide each
year.
Basically put, LIN is a single-wire serial communications protocol. The protocol is
based on the common UART interface, which is available on most micro-
controllers and is extremely affordable. Further more, it can be easily implemented
as an equivalent in software. A LIN network is comprised of a LIN Master, and at
least one LIN Slave. The master requests data from the slaves by using a
chronological schedule. Because only one LIN message is transmitted at any given
point in time, and because all messages to be transmitted are sent within one cycle,
it is impossible for data collisions to occur. Thus no arbitration or collision
management in the slave nodes is required.
They are all automotive protocols. Like other protocols, they all have their pros
and cons. CAN is the main protocol that is in use today. All newer model cars are
mandated by law to use this protocol for connecting engine control units (ECUs).
LIN is a protocol that is used for interconnecting other components within a car;
it's main advantage is that is is cheaper to implement than CAN. Lastly, FlexRay is
the newest protocol of the bunch. It was designed to supersede CAN, being both
more reliable and permitting faster data speeds; it was however, also more
expensive. The consortium that was developing the protocol disbanded in 2009.
However, the specifications are still available, and the protocol is currently being
converted into a standard. The Local Interconnect Network (LIN) protocol
specification provides a low-cost, short-distance, and low-speed network, enabling
the implementation of a new level of electronics intelligence in automotive
subsystems. LIN operates under a CAN platform, but it doesn't require the robust
data rate and bandwidth performance, or the higher cost, associated with CAN.
The typical automobile network is broken up into several subnetworks. These in-
clude body control, powertrain, and multimedia networks. Depending on the speed
23
and cost requirements, either CAN or LIN can be implemented..LIN is a single-
master multislave bus that communicates via a single wire, reducing wiring
complexity as well as cost. Because this protocol is self-synchronizing, it allows
the slave nodes to run from a low-cost RC oscillator.LIN and CAN don't compete
with each other, but instead complement one another. On the one hand, CAN
serves high-speed, error-sensitive needs and operates on a 5-V differential bus.
LIN, however, serves low-speed, low-bandwidth requirements on a 12-V single-
wire bus.An interface is necessary between LIN's country roads and CAN's high-
speed thoroughfares. A bridge node might consist of a microcontroller with an
integrated LIN transceiver combined with a low-cost stand-alone CAN transceiver.
This The CAN specification requirement for node-to-node oscillator tolerances of
1.5% and hardware-based error handling drive node costs up to well over $2.00.
But, LiN's tolerances of 15% and the ability to implement its protocol entirely in
software are moving node costs below $2.00.
24
CHAPTER 3
HARDWARE REQUIREMENTS
3.11 OPERATION
25
3.12 CHARACTERISTICS
There are several key characteristics of a logic analyser that separate it from multi-
channel oscilloscopes and other test instruments:
• Multiple channels: Logic analyzers are designed to monitor a large number of
digital lines. As logic analyzers are optimised for monitoring a large number of
digital circuits, typically they may have anywhere between about 32 and 200+
channels they can monitor, each channel monitoring one digital line. However
some specialised logic analyzers are suitably scaled to be able to handle many
more lines, and in this way enable tracking and fault finding on much more
complex systems.
• Provide a time display of logic states: Logic analysers possess a horizontal
time axis and a vertical axis to indicate a logic high or low states. In this way a
picture of the digital lines can be easily displayed.
• Displays logic states: The vertical display on the analyser displays the logic
state as a high of low state. The signals enter the various channels and are
converted into a high or low state for further processing within the analyser. It
provides a logic timing diagram of the various lines being monitored.
• Does NOT display analogue information : These test instruments do not
present any analogue information, and in this way they differ from an
oscilloscope. They are purely aimed at monitoring the logic operation of the
system. If any analogue information is required, then an oscilloscope must be
used in addition.
3.13 ADVANTAGES
The main use for logic analyzers is to look at digital signals. They were a
particularly attractive and useful test instrument many years ago when complicated
digital systems were made using many different ICs. It was possible to gain access
to the various test points and it was possible to debug the wide busses and IO. Now
with much higher levels of integration this is not always possible because there are
more embedded devices using System On a Chip, SOC designs, and access to the
required test points is not achievable.
26
3.14 BLOCK DIAGRAM
The TJA1020 is the interface between the LIN master/slave protocol controller and
the physical bus in a Local Interconnect Network (LIN). It is primarily intended for
in-vehicle sub-networks using baud rates from 2.4 up to 20 Kbaud.
The transmit data stream of the protocol controller at the TXD input is converted
by the LIN transceiver into a bus signal with controlled slew rate and wave shaping
to minimize EME. The LIN bus output pin is pulled HIGH via an internal
termination resistor. For a master application an external resistor in series with a
diode should be connected between pin INH or pin BAT and pin LIN. The receiver
detects the data stream at the LIN bus input pin and transfers it via pin RXD to the
microcontroller.
In normal transceiver operation the TJA1020 can be switched in the normal slope
mode or the low slope mode. In the low slope mode the TJA1020 lengthens the
rise and fall slopes of the LIN bus signal, thus further reducing the already very
low emission in normal slope mode.
In sleep mode the power consumption of the TJA1020 is very low, whereas in
failure modes the power consumption is reduced to a minimum. Data is transferred
across the bus in fixed form messages of selectable lengths. The master task
27
transmits a header that consists of a break signal followed by synchronization and
identifier fields. The slaves respond with a data frame that consists of between 2, 4
and 8 data bytes plus 3 bytes of control information
3.2.1 FEATURES
The LIN bus is a polled bus with a single master device and one or more slave
devices. The master device contains both a master task and a slave task. Each slave
device contains only a slave task. Communication over the LIN bus is controlled
entirely by the master task in the master device. The basic unit of transfer on the
LIN bus is the frame, which is divided into a header and a response. The header is
always transmitted by the master node and consists of three distinct fields: the
break, synchronization (sync), and identifier (ID). The response, which is
transmitted by a slave task and can reside in either the master node or a slave node,
consists of a data payload and a checksum.
Normally, the master task polls each slave task in a loop by transmitting a header,
which consists of a break-sync-ID sequence. Prior to starting the LIN, each slave
task is configured to either publish data to the bus or subscribe to data in response
to each received header ID. Upon receiving the header, each slave task verifies ID
parity and then checks the ID to determine whether it needs to publish or subscribe.
If the slave task needs to publish a response, it transmits one to eight data bytes to
the bus followed by a checksum byte. If the slave task needs to subscribe, it reads
the data payload and checksum byte from the bus and takes appropriate internal
action.
28
The Local Interconnection Network (LIN) standard defines a low
cost, serial communication network for automotive distributed electronic systems.
LIN is a complement to the other automotive multiplex networks, including
the Controller Area Network (CAN), but it targets applications that require
networks that do not need excessive bandwidth, performance, or extreme fault
tolerance.
Typical LIN applications are associated with body-control electronics for occupant
comfort, such as assembly units for doors, steering wheel, seats and mirrors, and
motors and sensors in climate control, lighting, rain sensors, smart wipers,
intelligent alternators and switch panels. With LIN, automotive subsystem
designers can connect modules for these applications to the car's network and then
have them accessible for a variety of diagnostics and services.
29
3.23 APPLICATIONS
1. Roof: LIN system is used at vehicle roof for controlling their sensors such
as sun roof sensor and light control sensor.
2. Steering wheel: It is used at vehicle steering wheel for controlling climate
control sensor, wiper sensor, turning light sensor, radio and wheel lock
sensor etc.
3. Seat: It is used at vehicle seat where the position of seat is controlled
through a motor and this motor is controlled through LIN system. Beside it
is also used for controlling the occupant sensor and control panel sensor
which are installed at seat.
4. Door: It is used at vehicle door for controlling the position of motor which
is installed with door mirror. Beside this it is also used for controlling
central ECU (electronic control unit), window lift, seat control switch and
door lock etc.
5. Engine and Illuminations: It is also used for controlling engine sensor
such as cooling fan motor sensor and illumination senor which controls the
illumination of light
30
LCDs are used in a wide range of applications, including LCD
televisions, computer monitors, instrument panels, aircraft cockpit displays, and
indoor and outdoor signage. Small LCD screens are common in portable consumer
devices such as digital cameras, watches, calculators, and mobile telephones,
including smartphones. LCD screens are also used on consumer
electronics products such as DVD players, video game devices and clocks. LCD
screens have replaced heavy, bulky cathode ray tube (CRT) displays in nearly all
applications. LCD screens are available in a wider range of screen sizes than CRT
and plasma displays, with LCD screens available in sizes ranging from tiny digital
watches to very large television receivers. LCDs are slowly being replaced
by OLEDs, which can be easily made into different shapes, and have a lower
response time, wider color gamut, virtually infinite color contrast and viewing
angles, lower weight for a given display size and a slimmer profile (because
OLEDs use a single glass or plastic panel whereas LCDs use two glass panels; the
thickness of the panels increases with size but the increase is more noticeable on
LCDs) and potentially lower power consumption (as the display is only "on" where
needed and there is no backlight). OLEDs, however, are more expensive for a
given display size due to the very expensive electroluminescent materials or
phosphors that they use. Also due to the use of phosphors, OLEDs suffer from
screen burn-in and there is currently no way to recycle OLED displays, whereas
LCD panels can be recycled, although the technology required to recycle LCDs is
not yet widespread. Attempts to increase the lifespan of LCDs are quantum dot
displays, which offer similar performance to an OLED display, but the quantum
dot sheet that gives these displays their characteristics can not yet be recycled.
3.31 FEATURES
31
density for long-distance viewing and portable devices having a high density
for close-range detail. The Viewing Angle of an LCD may be important
depending on the display and its usage, the limitations of certain display
technologies mean the display only displays accurately at certain angles.
• Temporal performance: the temporal resolution of an LCD is how well it can
display changing images, or the accuracy and the number of times per second
the display draws the data it is being given. LCD pixels do not flash on/off
between frames, so LCD monitors exhibit no refresh-induced flicker no matter
how low the refresh rate.[149] But a lower refresh rate can mean visual artefacts
like ghosting or smearing, especially with fast moving images. Individual pixel
response time is also important, as all displays have some inherent latency in
displaying an image which can be large enough to create visual artifacts if the
displayed image changes rapidly.
LCD modules are very commonly used in most embedded projects, the reason
being its cheap price, availability and programmer friendly. Most of us would have
come across these displays in our day to day life, either at PCO’s or calculators.
The appearance and the pinouts have already been visualized above now let us get
a bit technical.
16×2 LCD is named so because; it has 16 Columns and 2 Rows. There are a lot of
combinations available like, 8×1, 8×2, 10×2, 16×1, etc. but the most used one is
the 16×2 LCD. So, it will have (16×2=32) 32 characters in total and each character
will be made of 5×8 Pixel Dots. Now, we know that each character has (5×8=40)
32
40 Pixels and for 32 Characters we will have (32×40) 1280 Pixels. Further, the
LCD should also be instructed about the Position of the Pixels. Hence it will be a
hectic task to handle everything with the help of MCU, hence an Interface IC like
HD44780is used, which is mounted on the backside of the LCD Module itself. The
function of this IC is to get the Commands and Data from the MCU and process
them to display meaningful information onto our LCD Screen. You can learn how
to interface an LCD using the above mentioned links. If you are an advanced
programmer and would like to create your own library for interfacing your
Microcontroller with this LCD module then you have to understand the HD44780
IC is working and commands which can be found its datasheet
33
A 16×2 LCD means it can display 16 characters per line and there are 2
such lines. In this LCD each character is displayed in 5×7 pixel matrix.
This LCD has two registers, namely, Command and Data.
34
3.32.2 REGISTERS
A 16*2 LCD display module has two registers namely command and data. The
register select is used to transfer from one register to otherRS=0 for command
register, whereas RS=1 for data register.
command Register: The command register stores the command instructions given
to the LCD. A command is an instruction given to LCD to do a predefined task.
Examples like initializing it, clearing its screen, setting the cursor position,
controlling display etc. Processing for commands happens in the command
register.
Data Register: The data register stores the data to be displayed on the LCD. The
data is the ASCII value of the character to be displayed on the LCD. When we
send data to LCD it goes to the data register and is processed there. When RS=1,
data register is selected.
35
UART to serial communication
3.41 ARCHITECTURE
Voltage levels
37
RS-232 data line on the terminals of the receiver side (RxD) probed by an
oscilloscope (for an ASCII "K" character (0x4B) with 1 start bit, 8 data bits, 1 stop
bit, and no parity bits).
The RS-232 standard defines the voltage levels that correspond to logical one and
logical zero levels for the data transmission and the control signal lines. Valid
signals are either in the range of +3 to +15 volts or the range −3 to −15 volts with
respect to the "Common Ground" (GND) pin; consequently, the range between −3
to +3 volts is not a valid RS-232 level. For data transmission lines (TxD, RxD, and
their secondary channel equivalents), logic one is represented as a negative voltage
and the signal condition is called "mark". Logic zero is signaled with a positive
voltage and the signal condition is termed "space". Control signals have the
opposite polarity: the asserted or active state is positive voltage and the de-asserted
or inactive state is negative voltage. Examples of control lines include request to
send (RTS), clear to send (CTS), data terminal ready (DTR), and data set ready
(DSR).
38
to produce the required voltages from a 3 or 5 volt supply. RS-232 drivers and
receivers must be able to withstand indefinite short circuit to ground or to any
voltage level up to ±25 volts. The slew rate, or how fast the signal changes
between levels, is also controlled.
Because the voltage levels are higher than logic levels typically used by integrated
circuits, special intervening driver circuits are required to translate logic levels.
These also protect the device's internal circuitry from short circuits or transients
that may appear on the RS-232 interface, and provide sufficient current to comply
with the slew rate requirements for data transmission.
Connectors
RS-232 devices may be classified as Data Terminal Equipment (DTE) or Data
Circuit-terminating Equipment (DCE); this defines at each device which wires will
be sending and receiving each signal. According to the standard, male connectors
have DTE pin functions, and female connectors have DCE pin functions. Other
devices may have any combination of connector gender and pin definitions. Many
terminals were manufactured with female connectors but were sold with a cable
with male connectors at each end; the terminal with its cable satisfied the
recommendations in the standard.
The standard recommends the D-subminiature 25-pin connector up to revision C,
and makes it mandatory as of revision D. Most devices only implement a few of
the twenty signals specified in the standard, so connectors and cables with fewer
pins are sufficient for most connections, more compact, and less expensive.
Personal computer manufacturers replaced the DB-25M connector with the
smaller DE-9M connector. This connector, with a different pinout (see Serial port
pinouts), is prevalent for personal computers and associated devices.
Cables
The standard does not define a maximum cable length, but instead defines the
maximum capacitance that a compliant drive circuit must tolerate. A widely used
rule of thumb indicates that cables more than 15 m (50 ft) long will have too much
capacitance, unless special cables are used. By using low-capacitance cables,
communication can be maintained over larger distances up to about 300 m
(1,000 ft).[13] For longer distances, other signal standards, such as RS-422, are
better suited for higher speeds.
Since the standard definitions are not always correctly applied, it is often necessary
to consult documentation, test connections with a breakout box, or use trial and
error to find a cable that works when interconnecting two devices. Connecting a
fully standard-compliant DCE device and DTE device would use a cable that
39
connects identical pin numbers in each connector (a so-called "straight cable").
"Gender changers" are available to solve gender mismatches between cables and
connectors. Connecting devices with different types of connectors requires a cable
that connects the corresponding pins according to the table below. Cables with 9
pins on one end and 25 on the other are common. Manufacturers of equipment
with 8P8C connectors usually provide a cable with either a DB-25 or DE-9
connector (or sometimes interchangeable connectors so they can work with
multiple devices). Poor-quality cables can cause false signals by crosstalk between
data and control lines (such as Ring Indicator).
If a given cable will not allow a data connection, especially if a gender changer is
in use, a null modem cable may be necessary. Gender changers and null modem
cables are not mentioned in the standard, so there is no officially sanctioned design
for them.
3-wire and 5-wire RS-232
A minimal "3-wire" RS-232 connection consisting only of transmit data, receive
data, and ground, is commonly used when the full facilities of RS-232 are not
required. Even a two-wire connection (data and ground) can be used if the data
flow is one way (for example, a digital postal scale that periodically sends a weight
reading, or a GPS receiver that periodically sends position, if no configuration via
RS-232 is necessary). When only hardware flow control is required in addition to
two-way data, the RTS and CTS lines are added in a 5-wire version.
3.43 APPLICATIONS
Modem applications are one of the most popular uses for the RS–232 standard.
Figure 4 illustrates a typical modem application utilizing the RS–232 interface
standard. As can be seen in the diagram, the PC is the DTE and the modem is the
DCE. Communication between each PC and its associated modem is accomplished
using the RS–232 standard. Communication between the two modems is
accomplished via telecommunication. It should be noted that although a
microcomputer is usually the DTE in RS–232 applications, this is not mandatory
according to a strict interpretation of the standard
40
Transistor–transistor logic (TTL) is a logic family built from bipolar junction
transistors. Its name signifies that transistors perform both the logic function (the
first "transistor") and the amplifying function (the second "transistor"); it is the
same naming convention used in resistor–transistor logic (RTL) and diode–
transistor logic (DTL).
TTL integrated circuits (ICs) were widely used in applications such as computers,
industrial controls, test equipment and instrumentation, consumer electronics,
and synthesizers. Sometimes TTL-compatible logic levels are not associated
directly with TTL integrated circuits, for example, they may be used at the inputs
and outputs of electronic instruments.[1]
TTL became the foundation of computers and other digital electronics. Even
after Very-Large-Scale Integration (VSLI) CMOS integrated
circuit microprocessors made multiple-chip processors obsolete, TTL devices still
found extensive use as glue logic interfacing between more densely integrated
components.
3.51 IMPLEMENTATION
41
current flows from the positive rail, through the resistor and into the base of the
multiple emitter transistor.[13] This current passes through the base–emitter junction
of the output transistor, allowing it to conduct and pulling the output voltage low
(logical zero).
An input logical zero. Note that the base–collector junction of the multiple-
emitter transistor and the base–emitter junction of the output transistor are in series
between the bottom of the resistor and ground. If one input voltage becomes zero,
the corresponding base–emitter junction of the multiple-emitter transistor is in
parallel with these two junctions. A phenomenon called current steering means that
when two voltage-stable elements with different threshold voltages are connected
in parallel, the current flows through the path with the smaller threshold voltage.
That is, current flows out of this input and into the zero (low) voltage source. As a
result, no current flows through the base of the output transistor, causing it to stop
conducting and the output voltage becomes high (logical one). During the
transition the input transistor is briefly in its active region; so it draws a large
current away from the base of the output transistor and thus quickly discharges its
base. This is a critical advantage of TTL over DTL that speeds up the transition
maximum voltage, such as 15 V for the 7426,[16] useful when driving other than
TTL loads.
Like DTL, TTL is a current-sinking logic since a current must be drawn from
inputs to bring them to a logic 0 voltage level. The driving stage must absorb up to
1.6 mA from a standard TTL input while not allowing the voltage to rise to more
than 0.4 volts. [19]. The output stage of the most common TTL gates is specified to
function correctly when driving up to 10 standard input stages (a fanout of 10).
42
TTL inputs are sometimes simply left floating to provide a logical "1", though this
usage is not recommended.[20]
Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is
defined as "low" when between 0 V and 0.8 V with respect to the ground terminal,
and "high" when between 2 V and VCC (5 V),[21][22] and if a voltage signal ranging
between 0.8 V and 2.0 V is sent into the input of a TTL gate, there is no certain
response from the gate and therefore it is considered "uncertain" (precise logic
levels vary slightly between sub-types and by temperature). TTL outputs are
typically restricted to narrower limits of between 0.0 V and 0.4 V for a "low" and
between 2.4 V and VCC for a "high"
3.53 COMPARISONS
TTL devices consume substantially more power than equivalent CMOS devices at
rest, but power consumption does not increase with clock speed as rapidly as for
CMOS devices.[27] Compared to contemporary ECL circuits, TTL uses less power
and has easier design rules but is substantially slower. Designers can combine ECL
and TTL devices in the same system to achieve best overall performance and
economy, but level-shifting devices are required between the two logic families.
TTL is less sensitive to damage from electrostatic discharge than early CMOS
devices.
Due to the output structure of TTL devices, the output impedance is asymmetrical
between the high and low state, making them unsuitable for driving transmission
lines. This drawback is usually overcome by buffering the outputs with special
line-driver devices where signals need to be sent through cables. ECL, by virtue of
its symmetric low-impedance output structure, does not have this drawback.
The TTL "totem-pole" output structure often has a momentary overlap when both
the upper and lower transistors are conducting, resulting in a substantial pulse of
current drawn from the power supply. These pulses can couple in unexpected ways
between multiple integrated circuit packages, resulting in reduced noise margin
and lower performance. TTL systems usually have a decoupling capacitor for
every one or two IC packages, so that a current pulse from one TTL chip does not
momentarily reduce the supply voltage to another.
Several manufacturers now supply CMOS logic equivalents with TTL-compatible
input and output levels, usually bearing part numbers similar to the equivalent TTL
component and with the same pinouts. For example, the 74HCT00 series provides
43
many drop-in replacements for bipolar 7400 series parts, but
uses CMOS technology.
3.54 APPLICATIONS
Before the advent of VLSI devices, TTL integrated circuits were a standard
method of construction for the processors
of minicomputer and mainframe computers; such as the DEC VAX and Data
General Eclipse, and for equipment such as machine tool numerical controls,
printers and video display terminals. As microprocessors became more functional,
TTL devices became important for "glue logic" applications, such as fast bus
drivers on a motherboard, which tie together the function blocks realized in VLSI
elements.
Analog applications
While originally designed to handle logic-level digital signals, a TTL inverter can
be biased as an analog amplifier. Connecting a resistor between the output and the
input biases the TTL element as a negative feedback amplifier. Such amplifiers
may be useful to convert analog signals to the digital domain but would not
ordinarily be used where analog amplification is the primary purpose.[29] TTL
inverters can also be used in crystal oscillators where their analog amplification
ability is significant.
A TTL gate may operate inadvertently as an analog amplifier if the input is
connected to a slowly changing input signal that traverses the unspecified region
from 0.8 V to 2 V. The output can be erratic when the input is in this range. A
slowly changing input like this can also cause excess power dissipation in the
output circuit. If such an analog input must be used, there are specialized TTL
parts with Schmitt trigger inputs available that will reliably convert the analog
input to a digital value, effectively operating as a one bit A to D converter.
44
CHAPTER 4
RESULT ANALYSIS
Output:
45
Input 1 kHz RS-232 clock data
CONVERTED SIGNAL:
46
RECEIVED SIGNAL:
CONCLUSION
The goal of project is achieved and difficulties are solved. CAN bus is most
commonly used as part of a distributed control system, connecting vital systems
that may be spread throughout a facility. Generally a Human Machine Interface
(HMI) allows the operator to interact with the system. From there programmable
logic controllers (PLCs) relay those commands through the CAN bus interface to
the sensors, actuators, motors or other mechanical systems that carry out the
desired action .LIN bus is generally cheaper than the can bus to implement. It can
be implemented single wire.so that we can reduce the cost and manpower
47
REFERENCES
48