introduction
TRANSCRIPT
1. INTRODUCTION
Time division multiple access (TDMA) is a channel access method
for shared medium networks. It allows several users to share the same
frequency channel by dividing the signal into different time The users
transmit in rapid succession, one after the other, each using his own
time slot. This allows multiple stations to share the same transmission
medium (e.g. radio frequency channel) while using only a part of its
channel capacity slots.
Serial data communication is a popular means of transmitting data
between a computer and a peripheral device such as a programmable
instrument or even another computer. Serial communication uses a
transmitter to send data, one bit at a time, over a single
communication line to a receiver.
In our project currently through serial data connector RS232 we have
connected the PC to AT89C51 microcontroller based circuit which is
connected to two line 16 bit LCD. Serial communication is a form of
I/O in which the bits of a byte design transferred appear one after
another in a timed sequences on a single wire.
Using hyper link present in PC whatever data we typed on pc that is
shown on the LCD at the same time. In the extension of this project
instead of using two line 16 bit LCD we will use channel with TDMA
technique to connect more than one PC together and they can access
to the data using wireless communication network.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 1
2. MULTIPLE ACCESS TECHNOLOGY
Different available multiple access technology are:
2.1 CDMA
Code division multiple access (CDMA) is a channel access method
used by various radio communication technologies. CDMA employs
spread-spectrum technology and a special coding scheme (where each
transmitter is assigned a code) to allow multiple users to be
multiplexed over the same physical channel. CDMA is a form of
spread-spectrum signaling, since the modulated coded signal has a
much higher data bandwidth than the data being communicated.
A spread spectrum technique spreads the bandwidth of the data
uniformly for the same transmitted power. Spreading code is a
pseudorandom code that has a narrow Ambiguity function, unlike
other narrow pulse codes. In CDMA a locally generated code runs at a
much higher rate than the data to be transmitted. Data for
transmission is simply logically XOR (exclusive OR) added with the
faster code. The figure shows how spread spectrum signal is
generated. The data signal with pulse duration of Tb is XOR added
with the code signal with pulse duration of Tc.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 2
Each user in a CDMA system uses a different code to modulate their
signal. Choosing the codes used to modulate the signal is very
important in the performance of CDMA systems. The best
performance will occur when there is good separation between the
signal of a desired user and the signals of other users. The separation
of the signals is made by correlating the received signal with the
locally generated code of the desired user. If the signal matches the
desired user's code then the correlation function will be high and the
system can extract that signal. If the desired user's code has nothing in
common with the signal the correlation should be as close to zero as
possible (thus eliminating the signal); this is referred to as cross
correlation. If the code is correlated with the signal at any time offset
other than zero, the correlation should be as close to zero as possible.
This is referred to as auto-correlation and is used to reject multi-path
interference.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 3
2.2 FDMA
Frequency Division Multiple Access or FDMA is a channel access
method used in multiple-access protocols as a channelization
protocol. FDMA gives users an individual allocation of one or several
frequency bands, allowing them to utilize the allocated radio spectrum
without interfering with each other. Multiple Access systems
coordinate access between multiple users.
Features
FDMA requires high-performing filters in the radio hardware, in
contrast to TDMA and CDMA.
FDMA is not vulnerable to timing problems as TDMA. Since a
predetermined frequency band is available for the entire period
of communication, stream data (a continuous flow of data that
may not be packetized) can easily be used with FDMA.
Due to the frequency filtering, FDMA is not sensitive to near-far
problem which is pronounced for CDMA.
Disadvantage: Crosstalk which causes interference on the other
frequency and may disrupt the transmission.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 4
2.3 TDMA
Time division multiple access (TDMA) is a channel access method
for shared medium networks. It allows several users to share the same
frequency channel by dividing the signal into different time slots. The
users transmit in rapid succession, one after the other, each using his
own time slot. This allows multiple stations to share the same
transmission medium (e.g. radio frequency channel) while using only
a part of its channel capacity. High-speed local area networking over
existing home wiring (power lines, phone lines and coaxial cables) is
based on a TDMA scheme
TDMA characteristics
Shares single carrier frequency with multiple users
Non-continuous transmission makes handoff simpler
Slots can be assigned on demand in dynamic TDMA
Less stringent power control than CDMA due to reduced intra
cell interference
Higher synchronization overhead than CDMA
Advanced equalization may be necessary for high data rates if
the channel is "frequency selective" and creates Inter symbol
interference
Cell breathing (borrowing resources from adjacent cells) is more
complicated than in CDMA
Frequency/slot allocation complexity
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 5
3.COMMUNICATION CHANNEL
3.1 CHANNELIZATION
Channelization is a multiple access method in which the available
bandwidth of a link is shared in time, frequency, or through code
between different station. In telecommunications and computer
networks, a channel access method or multiple access method allows
several terminals connected to the same multi-point transmission
medium to transmit over it and to share its capacity. Examples of
shared physical media are wireless networks, bus networks, ring
networks, hub networks and half-duplex point-to-point links.
3.2 Frequency Division Multiple Access (FDMA)
In FDMA the available bandwidth is divided into frequency bands.
Each station is allocated to send it’s data. Each station is reserved for
a specific station and it belongs to the station all the time. The
frequency division multiple access (FDMA) channel-access scheme is
based on the frequency-division multiplex (FDM) scheme, which
provides different frequency bands to different data-streams. In the
FDMA case, the data streams are allocated to different users or nodes.
An example of FDMA systems were the first-generation (1G) cell-
phone systems. The FDM techniques combines the load from low
bandwidth channel and transmit them by using a high bandwidth
channel. The channel that are combined are low pass. The multiplexer
modulates the signals, combines them, and creates a band pass signal.
The bandwidth of the channel is shifted by the multiplexer.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 6
While FDMA is an access method in the data link layer . The signal is
created in the allocated band .The signal created at each station are
automatically band pass filtered. They are mixed when they are sent
to common channel.
3.3 Time division multiple access (TDMA)
The time division multiple access (TDMA) channel access scheme is
based on the time division multiplex (TDM) scheme, which provides
different time-slots to different data-streams (in the TDMA case to
different transmitters) in a cyclically repetitive frame structure. For
example, user 1 may use time slot 1, user 2 time slot 2, etc. until the
last user. Then it starts all over again. In time division multiple
accesss the station share the bandwidth of the channel in time. Each
station is allocated a time slot during which it can send data. Each
station transmits its data in assigned time slot. TDMA & TDM
conceptually seems same but there is difference. TDM combines the
data from slower channel and transmits them by using a faster
channel. On the other hand TDMA is an access method in the datalink
layer. The datalink layer in each station tells its physical layer to use
the allocated time slot. There is no physical multiplexer at the
physical layer.
3.4 Code division multiple access (CDMA)
The code division multiple access (CDMA) scheme is based on
spread spectrum. An example is the 3G cell phone system. CDMA
differs from FDMA because only one channel occupies the entire
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 7
bandwidth of the link. It differs from TDMA because all stations can
send data simultaneously, there is no time sharing. CDMA simply
means communication with different codes. In CDMA through
common channel different codes are communicated simultaneously.
CDMA is based on coding theory. Each station is assigned a code,
which is a sequence of numbers called chip.
3.5 WIRED COMMUNICATION CHANNEL
3.5.1 Coaxial Copper Cable (COAX)
Coax consist of a single inner core conductor of solid copper wire
surrounded by three outer layers of material. The innermost layer is a
type of insulation, such as plastic , followed by a solid aluminum or
braided copper shield. A final jacket of PVC or Teflon protects the
conductor and prevents interference from outside signal.
Coax cable were once used in long distance telephone networks and
local area data network(LAN), but they are now primarily used for
cable TV installation. Coax utilizes frequency bandwidth of either 50-
350 Mhz to transmit analog tv signals.
3.5.2 OPTICAL FIBRE
An optical fiber is a thin, flexible, transparent fiber that acts as a
waveguide, or "light pipe", to transmit light between the two ends of
the fiber. Optical fibers are widely used in fiber-optic
communications, which permits transmission over longer distances
and at higher bandwidths (data rates) than other forms of
communication.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 8
Optical fiber typically consists of a transparent core surrounded by a
transparent cladding material with a lower index of refraction. Light is
kept in the core by total internal reflection. This causes the fiber to act
as a waveguide. Fibers which support many propagation paths or
transverse modes are called multi-mode fibers (MMF), while those
which can only support a single mode are called single-mode fibers
(SMF). Multi-mode fibers generally have a larger core diameter, and
are used for short-distance communication links and for applications
where high power must be transmitted. Single-mode fibers are used
for most communication links longer than 1,050 meters.
3.5.3 Applications
OPTICAL FIBER COMMUNICATION
Optical fiber can be used as a medium for telecommunication and
networking because it is flexible and can be bundled as cables. It is
especially advantageous for long-distance communications, because
light propagates through the fiber with little attenuation compared to
electrical cables. This allows long distances to be spanned with few
repeaters. For short distance applications, such as creating a network
within an office building, fiber-optic cabling can be used to save
space in cable ducts. This is because a single fiber can often carry
much more data than many electrical cables.
Fiber is also immune to electrical interference; there is no cross-talk
between signals in different cables and no pickup of environmental
noise.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 9
Other uses of optical fibers
Fibers are widely used in illumination applications. They are used as
light guides in medical and other applications where bright light needs
to be shone on a target without a clear line-of-sight path.
Optical fiber illumination is also used for decorative applications,
including signs, art, and artificial Christmas trees.
Optical fiber is also used in imaging optics. A coherent bundle of
fibers is used, sometimes along with lenses, for a long, thin imaging
device called an endoscope, which is used to view objects through a
small hole. Medical endoscopes are used for minimally invasive
exploratory or surgical procedures (endoscopy). Industrial endoscopes
are used for inspecting anything hard to reach.
3.5.4 Principle of Operation
An optical fiber is a cylindrical dielectric waveguide (nonconducting
waveguide) that transmits light along its axis, by the process of total
internal reflection. The fiber consists of a core surrounded by a
cladding layer, both of which are made of dielectric materials. To
confine the optical signal in the core, the refractive index of the core
must be greater than that of the cladding.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 10
Index of refraction
The index of refraction is a way of measuring the speed of light in a
material. Light travels fastest in a vacuum, such as outer space. The
speed of light in a vacuum is about 300,000 kilometres (186 thousand
miles) per second. Index of refraction is calculated by dividing the
speed of light in a vacuum by the speed of light in some other
medium. The index of refraction of a vacuum is therefore 1 .
Total internal reflection
When light traveling in a dense medium hits a boundary at a steep
angle (larger than the "critical angle" for the boundary), the light will
be completely reflected. This effect is used in optical fibers to confine
light in the core. Light travels along the fiber bouncing back and forth
off of the boundary. Because the light must strike the boundary with
an angle greater than the critical angle, only light that enters the fiber
within a certain range of angles can travel down the fiber without
leaking out. This range of angles is called the acceptance cone of the
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 11
fiber. The size of this acceptance cone is a function of the refractive
index difference between the fiber's core and cladding.
In simpler terms, there is a maximum angle from the fiber axis at
which light may enter the fiber so that it will propagate, or travel, in
the core of the fiber. The sine of this maximum angle is the numerical
aperture (NA) of the fiber. Fiber with a larger NA requires less
precision to splice and work with than fiber with a smaller NA.
Single-mode fiber has a small NA
Multi-mode fiber
Fiber with large core diameter (greater than 10 micrometers) may be
analyzed by geometrical optics. Such fiber is called multi-mode fiber,
from the electromagnetic analysis (see below). In a step-index multi-
mode fiber, rays of light are guided along the fiber core by total
internal reflection. Rays that meet the core-cladding boundary at a
high angle (measured relative to a line normal to the boundary),
greater than the critical angle for this boundary, are completely
reflected. The critical angle (minimum angle for total internal
reflection) is determined by the difference in index of refraction
between the core and cladding materials. In graded-index fiber, the
index of refraction in the core decreases continuously between the
axis and the cladding. This causes light rays to bend smoothly as they
approach the cladding, rather than reflecting abruptly from the core-
cladding boundary.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 12
Single-mode fiber
As an optical waveguide, the fiber supports one or more confined
transverse modes by which light can propagate along the fiber. Fiber
supporting only one mode is called single-mode or mono-mode fiber.
The most common type of single-mode fiber has a core diameter of
8–10 micrometers and is designed for use in the near infrared. The
mode structure depends on the wavelength of the light used, so that
this fiber actually supports a small number of additional modes at
visible wavelengths.
3.5.5 OPTICAL FIBER CABLES
In practical fibers, the cladding is usually coated with a tough resin
buffer layer, which may be further surrounded by a jacket layer,
usually glass. These layers add strength to the fiber but do not
contribute to its optical wave guide properties. Rigid fiber assemblies
sometimes put light-absorbing ("dark") glass between the fibers, to
prevent light that leaks out of one fiber from entering another. This
reduces cross-talk between the fibers, or reduces flare in fiber bundle
imaging applications. Another important feature of cable is cable
withstanding against the horizontally applied force. It is technically
called max tensile strength defining how much force can applied to
the cable during the installation period.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 13
3.5.6 TERMINATION AND SPLICING
Optical fibers may be connected to each other by connectors or by
splicing, that is, joining two fibers together to form a continuous
optical waveguide. The generally accepted splicing method is arc
fusion splicing, which melts the fiber ends together with an electric
arc. For quicker fastening jobs, a "mechanical splice" is used.
Fusion splicing is done with a specialized instrument that typically
operates as follows: The two cable ends are fastened inside a splice
enclosure that will protect the splices, and the fiber ends are stripped
of their protective polymer coating (as well as the more sturdy outer
jacket, if present). The ends are cleaved (cut) with a precision cleaver
to make them perpendicular, and are placed into special holders in the
splicer. The splice is usually inspected via a magnified viewing screen
to check the cleaves before and after the splice. The splicer uses small
motors to align the end faces together, and emits a small spark
between electrodes at the gap to burn off dust and moisture. Then the
splicer generates a larger spark that raises the temperature above the
melting point of the glass, fusing the ends together permanently.
Mechanical fiber splices are designed to be quicker and easier to
install, but there is still the need for stripping, careful cleaning and
precision cleaving. The fiber ends are aligned and held together by a
precision-made sleeve, often using a clear index-matching gel that
enhances the transmission of light across the joint. Such joints
typically have higher optical loss and are less robust than fusion
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 14
splices, especially if the gel is used. All splicing techniques involve
the use of an enclosure into which the splice is placed for protection
afterward.
3.6 WIRELESS COMMUNICATION
Wireless communication is the transfer of information without the use
of wires. The distances involved may be short (a few meters as in
television remote control) or long (thousands or millions of kilometers
for radio communications). The term is often shortened to "wireless".
It encompasses various types of fixed, mobile, and portable two-way
radios, cellular telephones, personal digital assistants (PDAs), and
wireless networking.
Wireless operations permits services, such as long range
communications, that are impossible or impractical to implement with
the use of wires. The term is commonly used in the
telecommunications industry to refer to telecommunications systems
(e.g. radio transmitters and receivers, remote controls, computer
networks, network terminals, etc.) which use some form of energy
(e.g. radio frequency (RF), infrared light, laser light, visible light,
acoustic energy, etc.) to transfer information without the use of wires.
Information is transferred in this manner over both short and long
distances.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 15
3.6.1 WIRELESS NETWORKS
Wireless networking (i.e. the various types of unlicensed 2.4 GHz
WiFi devices) is used to meet many needs. Perhaps the most common
use is to connect laptop users who travel from location to location.
Another common use is for mobile networks that connect via satellite.
A wireless transmission method is a logical choice to network a LAN
segment that must frequently change locations. The following
situations justify the use of wireless technology:
To span a distance beyond the capabilities of typical cabling,
To provide a backup communications link in case of normal
network failure,
To link portable or temporary workstations,
To overcome situations where normal cabling is difficult or
financially impractical, or
To remotely connect mobile users or networks
3.6.2 APPLICATIONS OF WIRELESS TECHNOLOGY
Security systems
Wireless technology may supplement or replace hard wired
implementations in security systems for homes or office buildings.
Television remote control
Modern televisions use wireless (generally infrared) remote control
units. Now radio waves are also used.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 16
Cellular telephone (phones and modems)
The best known example of wireless technology is the cellular
telephone and modems. These instruments use radio waves to enable
the operator to make phone calls from many locations worldwide.
They can be used anywhere that there is a cellular telephone site to
house the equipment that is required to transmit and receive the signal
that is used to transfer both voice and data to and from these
instruments.
Wi-Fi
Wi-Fi is a wireless local area network that enables portable
computing devices to connect easily to the Internet. Standardized as
IEEE 802.11 a,b,g,n, Wi-Fi approaches speeds of some types of wired
Ethernet. Wi-Fi hot spots have been popular over the past few years.
Some businesses charge customers a monthly fee for service, while
others have begun offering it for free in an effort to increase the sales
of their goods.
Wireless energy transfer
Wireless energy transfer is a process whereby electrical energy is
transmitted from a power source to an electrical load that does not
have a built-in power source, without the use of interconnecting
wires.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 17
Computer interface devices
Answering the call of customers frustrated with cord clutter, many
manufactures of computer peripherals turned to wireless technology
to satisfy their consumer base. Originally these units used bulky,
highly limited transceivers to mediate between a computer and a
keyboard and mouse, however more recent generations have used
small, high quality devices, some even incorporating Bluetooth. These
systems have become so ubiquitous that some users have begun
complaining about a lack of wired peripherals. Wireless devices tend
to have a slightly slower response time than their wired counterparts,
however the gap is decreasing. Initial concerns about the security of
wireless keyboards have also been addressed with the maturation of
the technology.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 18
4.BLOCK DIAGRAM
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 19
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 20
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 21
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 22
RECTIFIER CIRCUIT
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 23
5. WORKING PRINCIPLE
12v AC is given to I/P of bridge rectifier ,it uses 4 diode and has no
centre tap transformer. The O/P of the bridge rectifier is pulsating
DC, so to reduce the pulsating nature of the O/P we are using 1000µf
capacitor(smoothing capacitor).Then this 12v is fed to the 7805
voltage regulator and we get constant 5v DC. This 5v DC acts as
VCC to the AT89C51 at pin 40.Crystal oscillator circuit is connected
to pin-18 and 19 to give stable oscillator frequency and here we are
using 2 capacitor(33pf) to reduce noise. The negative end of
capacitor(22µf ) is connected to the pin no.9 of the AT89C51 to reset it
,during the startup time. MAX 232 is interface to the AT89C51 to
convert the CMOS level to the TTL level and vice-versa. Pin 11 of
MAX232 is connected to pin-11 of AT89C51 & pin-12 of MAX232
is connected to pin-10 of AT89C51 and pin-14 is connected to pin-2
of DB9 and pin-13 is connected to pin-3 of DB9.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 24
6.COMPONENTS
6.1 INTRODUCTION TO AT89C51:
FEATURES:
8-bit microcontroller with 4K bytes of In-system reprogrammable
Flash memory
Fully Static Operation: 0 Hz to 24 MHz
Three-Level Program Memory Lock
128 x 8-Bit Internal RAM
32 Programmable I/O ports
Two 16-Bit Timer/Counters
Six Interrupt Sources
1 Serial port
Low Power Idle and Power Down Modes
6.2 DESCRIPTION
The AT89C51 is a low-power, high performance CMOS 8-bit
microcomputer with 4Kbytes of Flash Programmable and Erasable
Read Only Memory (PEROM).. The on-chip Flash allows the
program memory to be reprogrammed in-system or by a
conventional nonvolatile memory programmer. By combining a
versatile 8-bit CPU with Flash on a monolithic chip, the Atmel
AT89C51 is a powerful microcomputer which provides a highly
flexible and cost effective solution to many embedded control
applications.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 25
6.3 PACKAGES OF AT89C51
The AT89C51 family members come in different packages:
44A
PACKAGE TYPE
44 lead, Thin Plastic Gull Wing Quad
Flat Pack (TQFP)
44 lead, Plastic J-Leaded Chip
Carrier (PLCC)
40 lead,0.600* wide, Plastic Dual
Inline Package (PDIP)
44 lead, Plastic Gull Wing Quad Flat
pack (PQFP)
44J
40P6
44Q
6.4 PIN CONFIGURATION
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 26
AT89C51
PIN DISCRIPTION
AT89C51 chip contains 40 pins. These are described below:
VCC:
Pin 40 provides supply voltage to the chip. The voltage source is
+5V
GND
Pin 20 is connected to Ground.
PORT 0 (PIN 32-39)
Port 0 is an 8-bit open drain bi-directional I/O port. As an
output port each pin can sink eight TTL inputs. When 1s
are written to port 0 pins, the pins can be used as high
impedance inputs.
This port can be used for input or output. Each pin of these
pins must be connected externally to pull up resistor.
PORT 1(PIN 01-08)
Port 1 is an 8-bit bidirectional I/O port with internal pull
ups. The Port 1 output buffers can sink/source four TTL
inputs. When 1s are written to Port 1 pins they are pulled
high by the internal pull ups and can be used as inputs.
PORT2(pin 21-28)
Port 2 is an 8-bit bidirectional I/O port with internal pull-
ups. The Port 2 output buffers can sink/source four TTL
inputs. When 1s are written to Port 2 pins they are pulled
high by the internal pull-ups and can be used as inputs.
.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 27
PORT3(pin10-17)
Port 3 is an 8-bit bi-directional I/O port with internal pull-
ups.
The Port 3 output buffers can sink/source four TTL inputs.
When 1s are written to Port 3 pins they are pulled high by
the internal pull-ups used as inputs.
Port 3 also serves the functions of various special features of the
AT89C51 as listed below:
Port Pin Alternate Functions
P3.0 RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0(external interrupt0) P3.3 INT1(external interrupt1) P3.4 T0(timer0 external input) P3.5 T1(timer1 external input) P3.6 WR(external data memory write
strobe) P3.7
RD(external data memory read strobe)
P3.0 &P3.1 are used for the RxD & TxD serial
communication signals.
RST
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 28
The reset input on pin 9 is used to reset the microcontroller. A
high pulse to this pin, microcontroller will resets & terminate all
activities.
ALE/PROG
Address Latch Enable signals on pin 30 is used for demultiplexing
the address &data bus.
PSEN (PROGRAM STORE ENABLE):
This connected to pin no 29.
It is the read strobe to external program Memory.
EA/VPP
This signal is connected to pin no-31.
It is called as ‘External Access Enable’.
EA must be strapped to GND in order to enable the device to
fetch code from external program memory locations starting
at 0000H up to FFFFH.
EA should be strapped to VCC for internal program
executions.
XTAL1 This signal is connected to pin 19.
Input to the inverting oscillator amplifier and input to the
Internal clock operating circuit.
XTAL2
This signal is connected to pin 18.
Output from the inverting oscillator amplifier.
OSCILLATOR CHARACTERISTICS
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 29
XTAL1 and XTAL2 are the input and output, respectively
of an inverting amplifier which can be configured for use
as an on-chip oscillator.
Most often a quartz crystal oscillator connected to XTAL1
and XTAL2 needs two capacitors each of 33pF value .One
side of capacitors is connected to ground.
The oscillator connections are shown in the following
figure
XTAL connections to an External Clock Source are shown in the
figure
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 30
The reset pin (pin 9) is often referred to as power-on reset.
Activating a power-on reset will cause all values in the registers
to be lost.
IDLE MODE
In idle mode, the CPU puts itself to sleep while all the on chip
peripherals remain active. The mode is invoked by software.
The content of the on-chip RAM and all the special functions
registers remain unchanged during this mode.
The idle mode can be terminated by any enabled interrupt or by
a hardware reset.
POWER DOWN MODE
In the power down mode the oscillator is stopped, and the
instruction that invokes power down is the last instruction
executed. The on-chip RAM and Special Function Register
retain their values until the power down mode is terminated.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 31
The power-on reset circuit is shown below:
6.5 BLOCK DIAGRAM
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 32
6.6 BLOCK DESCRIPTION
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 33
REGISTERS
In a CPU, register are used to store information temporarily.
The most widely used 8-bit registers of AT89C51 are:
ACCUMULATOR-
It is used in arithmetic & logic well as in, (I/O) instruction.
B REGISTER-
REGISTER BANK (BANK0-BANK3)-
32 bytes locations of internal memory contains the register banks.
This is divided into 4 banks of register and in each bank there are 8
registers like R0-R7.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 34
The most widely used 16-bit registers of AT89C51:
DPTR REGISTER-
It is 16-bit, it can also be accessed as two 8-bit register, DPH
&DPL, where DPH is the high byte and DPL is the low byte.
PROGRAM COUNTER(PC)-
It is the 16-bit wide register which points to the address of the
next instruction to be executed.
PSW(PROGRAM STATUS WORD) REGISTER-
This register is an 8-bit register. It is referred to as flag
register. Only 6 bits of it are used by AT89C51.The two
unused bits are user-defined flags. Four of the flags are called as
conditional flags. These are: CY(carry), AC(auxiliary carry ),
P(parity), &O(overflow).
The bits of PSW Register are shown below:
CY AC F0 RS1 RS0 OV -- P
RS1, RS0 are used to change the bank registers.
F0 - available to the user for general purpose.
-- User definable bit
STACK POINTER
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 35
Stack pointer register is a 16-bit wide is decremented
automatically when each data is pushed onto the stack and is
incremented automatically when data is popped off the stack.
INSTRUCTION REGISTER
When an instruction is fetched from memory, it is loaded in
instruction register.
ALU(Arithmetic & Logic unit):
This unit performs the necessary arithmetic/logical calculations.
There are 4 port drivers:
Port 0 Drivers(Port 0.0 - Port 0.7)
Port 1 Drivers(Port 1.0 - Port 1.7)
Port 2 Drivers(Port 2.0 - Port 2.7)
Port 3 Drivers(Port 3.0 - Port 3.7)
RAM MEMORY SPACE ALLOCATION
There are 128 bytes of RAM in the AT89C51. These are
assigned addresses 00 to 7FH.
These 128 bytes are divided into 3 different groups:
A total of 32 bytes from location 00 to 1FH are set aside for
register bank and the stack.
A total of 16 bytes from locations 20H to 2FH are set aside for
bit addressable read/write memory.
A total of 80 bytes from locations 30H to 7FH are used for
storage, and is called as scratch pad. These 80 locations of RAM
are widely used for the purpose of storing data.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 36
PORT LATCH
In reading a port ,some instructions read the status of port pins while
other read the status of an internal port latch.
There are 4 port latch: Port 0 latch, Port 1latch ,Port 2 latch, Port 3
latch
TIMING &CONTROL
This unit generates the clock signals and control signals for
communication between the microcontroller & peripherals.
These signals are:
PSEN
ALE/ PROG
EA/ Vpp
RST
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 37
FLASH
To use the AT89C51 develop a microcontroller based system
requires a ROM burner that support Flash memory; however
unlike 8051 ,here a ROM eraser is not needed.
In flash memory , we must erase the entire contents of ROM in
order to program it again.
This erasing of flash is done by the PROM burner itself and that
is why separate eraser is not needed
TIMER PROGRAMMING IN AT89C51:
Basic registers of the timer-
Timer 0 register:
The 16-bit register of timer 0 is accessed as low byte and high
byte. The low byte register is called TL0 (timer0 low byte) and
the high byte register is referred to as TH0(timer0 high byte).
The timer0 registers are shown below:
D15 D1
4
D13 D1
2
D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
TH0 TL0
Timer1 register:
Timer1 is also 16 bits, and is split into two bytes, referred to as
TL1(timer1 low byte) and TH1(timer1 high byte).
Timer1 register are shown below :
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 38
D15 D1
4
D13 D1
2
D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
TH1 TL1
TMOD (timer mode) register:
Both timers0 and 1 use the same register, called TMOD, to set the
various timer operation modes.
TMOD is an 8- bit register in which the lower 4 bits are set aside for
timer 0 and the upper 4 bits are set aside for timer1.
The TMOD registers are shown below:
GATE C/T M1 M0 GATE C/T MI M0
TIMER 1 TIMER 0
GATE- When gate is set , it will use external method to start &
stop the timer. Timer/counter is enabled only while the INTX
pin is high and the TRX control pin is set. When cleared the
timer is enabled whenever the TRX control bit is set.
C/T- This bit in the TMOD register is used to decide whether
timer is used as delay generator or an event counter. If C/T=0, it
is used as delay generator
M1,M0- M0 and M1 select the timer mode. There are 3
modes:0,1,2,3.
Modes are described below:
M1 M0 MODE OPERATING
MODE
0 0 0 13-bit timer mode
(5-bit prescaler).
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 39
(MSB) (LSB)
0 1 1 16-bit timer
mode( no prescaler).
1 0 2 8-bit auto reload
C/T, THX hold a
value which is to be
reloaded into TLX
each time it
overflows.
1 1 3 Split timer mode.
- For maximum delay, mode 1 is used because it counts up to FFFF.
- For serial communication, mode 2 is used. Here, after THX is loaded
with the 8- bit value, it is automatically reloaded to TLX.
Timer flag (TFX)-
It is the flag which is set when timer overflows.
It is manually cleared for next operation.
It is set by the hardware & cleared by the
software.
Timer start (TRX)-
This is used to start / stop the timers
It is set to start.
It is clear to stop.
It is set & cleared by software.
TCON REGISTER
TF TR1 TF0 TR0 IE1 IT1 IE0 IT0
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 40
1
It is a bit- addressable 8 bit SFR(special function register) present
in the AT89C51 to control the timer. The upper four bits are used to
store the TF and TR bits of both timer0 and timer1.The lower 4 bits
are set aside for controlling the interrupt bits .
CLOCK SOURCE FOR TIMER
Every timer needs a clock pulse to tick. If C/T=0,the crystal frequency
attached to the AT89C51 is the source of the clock for the timer. this
means that the size of the crystal frequency attached to the
microcontroller decides the speed at which the AT89C51 timer ticks.
The frequency for the timer is always 1/12th the frequency of the
crystal oscillator.
XTAL frequency has the range between 10 MHZ to 40 MHZ, we will
concentrate on the XTAL frequency of 11.0592 MHZ for serial
communication.
6.7 MAX 232
FEATURES:
Operates From a Single 5-V Power Supply With 1.0-_F Charge-
Pump Capacitors
Operates Up To 120 kbit/s
Two Drivers and Two Receivers
±30-V Input Levels
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 41
Low Supply Current . . . 8 mA Typical
APPLICATIONS:
TIA/EIA-232-F, Battery-Powered Systems, Terminals,
Modems, Computers.
PIN CONFIGURATION OF MAX232
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 42
DESCRIPTION
Since the RS232 is not compatible with todays micro processor & micro
controller, we need a line driver ( voltage converter) to convert RS232’s
signals to TTL voltage levels that will be acceptable to the AT89C51
TxD & RxD pins.
MAX232 is an integrated circuit that converts signals from RS232 serial
to signal suitable for using TTL compatible digital logic circuits.i.e it
converts from RS232 voltage levels to TTL voltage levels and viceversa.
The MAX232 is a dual driver/receiver that includes a capacitive voltage
generator to supply TIA/EIA-232-F voltage levels from a single 5-V
supply and converts RX, TX, CTS & RTS signals .
Advantages: MAX232 uses a +5V power source which is same as the
source voltage for AT89C51.
It has two sets of line drivers for transferring and receiving data.The line
drivers used for TxD are called T1 & T2, while the line drivers for RxD
are R1& R2 respectively.
MAX232 requires 4 capacitors ranging from 1 to 22µF, but the most
widely used is 22 µF.
In many applications only one of each is used i.e T1 & R1 are used
together for TxD & RxD of AT89C51 and the second set is left unused.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 43
6.8 VOLTAGE REGULATORS
The 78xx (also sometimes known as LM78xx) series of devices is a
family of self-contained fixed linear voltage regulator integrated
circuits. When specifying individual ICs within this family, the xx is
replaced with a two-digit number, which indicates the output voltage
the particular device is designed to provide (for example, the 7805 has
a 5 volt output, while the 7812 produces 12 volts).
The 78xx line are positive voltage regulators, meaning that they are
designed to produce a constant voltage that is positive relative to a
common ground. 78xx ICs have three terminals
7805 VOLTAGE REGULATORS:
The 7805 provides circuit designers with an easy way to regulate DC
voltages to 5v.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 44
Encapsulated in a single chip/package (IC), the 7805 is a positive
voltage DC regulator that has only 3 terminals. They are: Input
voltage, Ground, Output Voltage.
Although the 7805 were primarily designed for a fixed-voltage output
(5V), it is indeed possible to use external components in order to
obtain DC output voltages of: 5V, 6V, 8V, 9V, 10V, 12V, 15V, 18V,
20V, 24V. It should be noted that the input voltage must, of course, be
greater that the required output voltage, so that it can be regulated
downwards.
GENERAL FEATURES:
Output Current up to 1A
Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V
Thermal Overload Protection
Short Circuit Protection
Output Transistor Safe Operating Area Protection
DIAGRAMATIC REPRESENTATION
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 45
7812 VOLTAGE REGULATORS:
The H7812 series of three terminal positive Regulators are available
in the TO-220 package and with several fixed output voltages, making
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 46
them useful in a wide range of applications. Each type employs
internal current limiting, Thermal shut down and safe operating area
protection, making it essentially indestructible. If adequate heat
sinking is provided, they can deliver over 1A output current.
GENERAL FEATURES
Output current up to 1A
Output Voltages of 12V
Thermal Overload Protection
Short Circuit Protection
Output Transistor Safe Operating Area Protection
DIAGRAMATIC REPRESENTATION
ADVANTAGES
Th
e se
ICs
do
not
require any additional components to
provide a constant, regulated source of power.
These series ICs have built-in protection against a circuit
drawing too much power. They also have protection against
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 47
overheating and short-circuits, making them quite robust in most
applications. In some cases, the current-limiting features of the
78xx devices can provide protection not only for the 78xx itself,
but also for other parts of the circuit it is used in, preventing
other components from being damaged as well.
6.9 LCD
A liquid crystal display (LCD) is a thin, flat electronic visual display
that uses the light modulating properties of liquid crystals (LCs). LCs
do not emit light directly.
16 CHARECTER X 2 LINE LCD:
Description
This is the first interfacing example for the Parallel Port. We will start
with something simple. This example doesn't use the Bi-directional
feature found on newer ports, thus it should work with most, if no all
Parallel Ports. It however doesn't show the use of the Status Port as an
input. So what are we interfacing? A 16 Character x 2 Line LCD
Module to the Parallel Port. These LCD Modules are very common
these days, and are quite simple to work with, as all the logic required
to run them is on board.
Schematic
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 48
Circuit Description:
Above is the quite simple schematic. The LCD panel's Enable and
Register Select is connected to the Control Port. The Control Port is
an open collector / open drain output. While most Parallel Ports have
internal pull-up resistors, there are a few which don't. Therefore by
incorporating the two 10K external pull up resistors, the circuit is
more portable for a wider range of computers, some of which may
have no internal pull up resistors.
We make no effort to place the Data bus into reverse direction.
Therefore we hard wire the R/W line of the LCD panel, into write
mode. This will cause no bus conflicts on the data lines. As a result
we cannot read back the LCD's internal Busy Flag which tells us if the
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 49
LCD has accepted and finished processing the last instruction. This
problem is overcome by inserting known delays into our program.
The 10k Potentiometer controls the contrast of the LCD panel.
Nothing fancy here. As with all the examples, I've left the power
supply out. You can use a bench power supply set to 5v or use a
onboard +5 regulator. Remember a few de-coupling capacitors,
especially if you have trouble with the circuit working properly.
The 2 line x 16 character LCD modules are available from a wide
range of manufacturers and should all be compatible with the
HD44780. The one I used to test this circuit was a Powertip PC-
1602F and an old Philips LTN211F-10 which was extracted from a
Poker Machine! The diagram to the right, shows the pin numbers for
these devices. When viewed from the front, the left pin is pin 14 and
the right pin is PIN1
7.BASICS OF SERIAL COMUNICATION
Computer transfer the data in two ways: parallel and serial.
In case of parallel data transfer ,often 8 or more lines (wire
conductors) are used to transfer data to a hard disk ;each uses
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 50
cables with many wire strips.eg-parallel transfers are printers and
hard disks; each uses cables many wire strips. Here one byte or
more than that data sent at a time.
In case of serial communication ,data is sent one bit at a time .
So that serial communication is used for transferring data
between two system located at distances of hundred millions
miles apart like an telephonic system .shown in the diagram-
DIAGRAM
For serial data communication to work ,the byte of data must be
converted to serial bits using a parallel-in-serial–out(PISO)shift
register,then it can be transmitted over a single data line.
The data transferred in telephone line the data must be
converted from 0s and 1s to audio tones,which are sinusoidal–
shaped signals .
This conversion is performed by a peripheral device called as
MODEM, which is known as modulator/demodulator.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 51
When the distance is short , the digital signal can be transferred
as it on a simple wire and requires no modulation.This is how
IBM PC key boards transfer data to the motherboard.
Serial data communication requires two methods :-
1-Synchronous method.
2-Asynchronous method.
In case of a a synchronous method transfer a block of data
(character ) at a time.
In case of Asynchronous method transfer a single byte at a time.
RS-232
It is a is a interface that a computer uses to talk and exchange data
with a modem and other serial devices.
An RS-232 port can supply only limited power to another device. The
number of output lines, the type of interface driver IC, and the state of
the output lines are important considerations.
The types of driver ICs used in serial ports can be divided into
three general categories:
Drivers which require plus (+) and minus (-) voltage power
supplies such as the 1488 series of interface integrated circuits.
(Most desktop and tower PCs use this type of driver.)
Low power drivers which require one +5 volt power supply.
This type of driver has an internal charge pump for voltage
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 52
conversion. (Many industrial microprocessor controls use this
type of driver.)
Low voltage (3.3 v) and low power drivers which meet the EIA-
562 Standard. (Used on notebooks and laptops.) .
RS232 ON DB9(9-PIN D-TYPE CONNECTOR)
Figure of male DB-9 port
Figure of female DB-9 port
PCB DESIGN SECTION
A PCB is a thing that we will require when we are deciding our
project. A proper PCB ensure that various circuit are interconnected
as per circuit diagram.
8.PCB FABRICATION
IC’S USED- AT89C51 Microcontroller , MAX232
Resistors (10k),
Capacitors (33pf ,22µf,10µF),
Crystal oscillator (11.0592 MHz),
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 53
Diodes(IN 4007),
7805 Voltage regulators,
RS-232 DB-9 Connector
9.PROGRAM USED
PROGRAM FOR LCD:
#include "lcd.h"
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 54
void lcd_init(){ lcd_cmd(0x38); //2 lines 5x7 matrix lcd_cmd(0x0C); //Display on cursor off lcd_cmd(0x06); //Increment cursor shift cursor to right lcd_cmd(0x01); //Clear screen}
void lcd_cmd(unsigned char cdata){ lcd_ready(); ldata = cdata; rs = 0; rw = 0; en = 1; delay(1); en = 0; return;}
void lcd_data(unsigned char avalue){ lcd_ready(); ldata = avalue; rs = 1; rw = 0; en = 1; delay(1); en = 0; return;}
void delay(unsigned int time){ unsigned int i,j; for(i = 0;i<time;i++) for(j=0;j<1275;j++);}
void lcd_ready(){ busy = 1; rs = 0;
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 55
rw = 1; while(busy == 1) { en = 0; delay(1); en = 1; } return;}
void lcd_num(unsigned int x) { unsigned char d[6]; char i=0;
if(x == 0) { lcd_data(48); return; } while(x != 0) {
d[i]= (x % 10);i++;x=(x/10);
} while(i!= 0) { lcd_data(d[--i]+48); } }
void lcd_string(unsigned char *str) { while(*str)
lcd_data(*str++); }
PROGRAM OF LCD HEADER FILE(LCD.H):
#include <REGX51.H>
#ifndef __LCD_H__
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 56
#define __LCD_H__
void lcd_init( );void lcd_cmd(unsigned char );void lcd_data(unsigned char );void lcd_string(unsigned char []);void lcd_num(unsigned int );void lcd_ready( );void delay(unsigned int );
sfr ldata = 0xA0;sbit rs = P3^7;sbit rw = P3^6;sbit en = P3^5;sbit busy = P2^7;
#endif
PROGRAM OF UART HEADER FILE(UART.H):
#ifndef __UART_H__#define __UART_H__
void serial_init(unsigned char ); //Initialise serial communicationvoid serial_tx(unsigned char ); //Transmit a character on serial portunsigned char serial_rx( ); //Recieve a character on serial portvoid string_tx(unsigned char[] ); //Transmit a string on serial portvoid num_tx(unsigned int ); //Transmit a number on serial port
#endif
PROGRAM FOR SERIAL TEST:
# include<lcd.h># include<uart.h>
void main(){
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 57
unsigned char r,i; lcd_init(); serial_init(0xFD); lcd_string("SERIAL TEST"); string_tx("SERIAL TEST \n"); delay(100); lcd_cmd(0x01); //Clear the screen while(1) { lcd_cmd(0x80); //Cursor to first line for(i=0;i<16;i++) { r = serial_rx(); serial_tx(r); lcd_data(r); } lcd_cmd(0xC0); //Cursor to second line for(i=0;i<16;i++) { r = serial_rx(); serial_tx(r); lcd_data(r); } lcd_cmd(0x01); //Clear the screen }}
10. CONCLUSION
Currently we have designed an AT89C51 micro-controller based
circuit which is connected through PC by RS232 serial
communication connector. The microcontroller is also connected to
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 58
LCD and through hyper link terminal whatever we type on PC that
will be display on 16 bit two line LCD.
In the extension of this project instead of using two line 16 bit LCD
we will use channel with TDMA technique to connect more than one
PC together and they can access to the data using wireless
communication network.
ADVANCED COMPUTER COMMUNICATION NETWORK USING TDMA Page 59