Professional Documents
Culture Documents
MCA Unit 4
MCA Unit 4
MCA Unit 4
Telecommunications
Communication
• Serial Vs Parallel data transfer.
• Simplex, Half and full duplex transmission
• Synchronous serial communication.
• Asynchronous serial communication
• Concept of Framing
• Baud rate
RS -232
Standard
Why Standards ?
• To allow compatibility among various data
communication equipment's made by different
manufacturers.
• What is RS ?
RS is Recommended Standard.
Set by Electronics Industries Association (EIA) in 1960.
RS 232
• Widely used Serial I/O interfacing standard.
• RS 232 A -1963
• RS 232 B – 1965
• RS 232 C – 1969
• Logic 1 is represented as -3V to -25 V
• Logic 0 is represented as + 3 V to +25V.
• Typically -9V and + 9V.
• Distance upto 50 feet.
• Speed upto 20K baud.
Unit-IV-8051 based Real world Interfacing and
6
Programming Part II
Department of Electronics
and Telecommunications
RS 232 Configuration
RS 232 Cable
1488 1489
DTE DCE
Data Data
Terminal Communication
Equipment 1489 1488 Equipment
Courtesy
Unit-IV-8051 based Real :http://en.wikipedia.org/wiki/RS-232
world Interfacing and
8
Programming Part II
Department of Electronics
and Telecommunications
Courtesy : http://www.arcelect.com/rs232.htm
Unit-IV-8051 based Real world Interfacing and
9
Programming Part II
Department of Electronics
and Telecommunications
Signals
• Transmitted Data (TxD)
• Data sent from DTE to DCE.
• Received Data (RxD)
• Data sent from DCE to DTE.
• Request To Send (RTS)
• Asserted (set to 0) by DTE to prepare DCE to receive data. This
may require action on the part of the DCE, e.g. transmitting a
carrier or reversing the direction of a half-duplex channel.
Modem
• DTR by DTE
• DSR by DCE
• RTS by DTE
• CTS by DCE
• DCD
• RI
MAX 232
• Operate from Single +5V Power Supply
• (+5V and +12V—MAX231/MAX239)
• Low-Power Receive Mode in Shutdown
• Meet All EIA/TIA-232E and V.28 Specifications
• Multiple Drivers and Receivers (Two)
Applications
• Portable Computers
• Low-Power Modems
• Interface Translation
• Battery-Powered RS-232 Systems
• Multidrop RS-232 Networks
Introduction
• Very much common in data acquisition.
• It is also called as EIA 485.
• RS485 supports 32 drivers and 32 receivers .
• Differential Voltage transmission mode.
• Distance 4000 Feet.
• Maximum data rate 10 Mbps.
• It’s a typical half duplex,2 wire multidrop system. 4 wire
with full duplex is also possible.
Network Topology.
I C
2
Bus
Unit-IV-8051 based Real world Interfacing and
23
Programming Part II
Department of Electronics
and Telecommunications
What is I2C ?
• Developed by Philips Semiconductors in early 1980 for
providing a simple way to talk between IC’s by using a
minimum number of pins.
I2C Continued…
• Since a serial Interface it reduces cost of manufacturing
of electronic product.
I2C Features
• Only two bus lines are required: a serial data line (SDA) and a
serial clock line (SCL).
• On-chip filtering (50 ns) rejects spikes on the bus data line to
preserve data integrity.
Procedure
One IC that wants to talk to another must: (Protocol)
1) Wait until it sees no activity on the I2C bus. SDA and
SCL are both high. The bus is 'free'.
4) Put out in serial form the unique binary 'address' (name) of the IC
that it wants to communicate with.
Communication Contd..
6) Ask the other IC to ACKNOWLEDGE (using one bit) that it recognized its
address and is ready to communicate.
8) The first IC sends or receives as many 8-bit words of data as it wants. After
every 8-bit data word the sending IC expects the receiving IC to acknowledge the
transfer is going OK.
9) When all the data is finished the first chip must free up the bus and it does
that by a special message called 'STOP'. It is just one bit of information
transferred by a special 'wiggling' of the SDA/SCL wires of the bus.
I2C Benefits
• Well known bus, over 20 years of existence, has become world
standard.
Benefits contd…
• Functional blocks on the block diagram correspond with the actual
ICs; designs proceed rapidly from block diagram to final schematic.
Benefits contd…
• Design-time reduces as designers quickly become familiar with
the frequently used functional blocks represented by I2C bus
compatible ICs.
benefits
• The simple 2-wire serial I2C bus minimizes interconnections
so ICs have fewer pins and there are not so many PCB tracks;
result - smaller and less expensive PCBs
Contd..
• Increases system design flexibility by allowing simple
construction of equipment variants and easy upgrading to
keep design up-to-date
Applications
• Closed loop control systems
• Low power converter for remote data acquisition
• Battery operated equipment
• Acquisition of analog values in automotive, audio and TV
applications.
Block Diagram
Control byte
Unit-IV-8051 based Real world Interfacing and
45
Programming Part II
SERIAL PERIPHERAL INTERFACE
(SPI)
What it is ?
• It’s a Synchronous Serial Bus Standard.
• Developed by Motorola and Supported by various
microprocessor and controller manufacturers.
• Devices communicate using Master / Slave relationship
in which master initiates the data frame.
• Data is transferred in both directions.
• Speed between 1-3 Mbps and 8 bit data is transferred.
SCLK
MOSI
Master MISO Slave
SS
Contd..
• It is up to the Master and Slave devices to know whether a
received byte is meaningful or not.
• Drawbacks :
• This do not have acknowledge mechanism.
• No flow control.
• It is suitable whenever only raw data are exchanged.
• Will be trouble some with more no.of slaves.
• Motorola , PIC, AVR supports SPI.
• H.W Comparison of I2C and SPI.
Unit-IV-8051 based Real world Interfacing and
49
Programming Part II
Department of Electronics
and Telecommunications
DS 1306 RTC
• Features
• Real-Time Clock (RTC) Counts Seconds, Minutes, Hours, Date
of the Month, Month, Day of the Week, and Year with
• Leap-Year Compensation
• Valid Up to 2100
• 96-Byte, Battery-Backed NV RAM for Data Storage
• Two Time-Of-Day Alarms,
• Programmable on Combination of Seconds, Minutes, Hours,
and Day of the Week
• 1Hz and 32.768kHz Clock Outputs
Unit-IV-8051 based Real world Interfacing and
50
Programming Part II
Department of Electronics
and Telecommunications
THANK - YOU