Professional Documents
Culture Documents
1. INTRODUCTION
IESCE Chittilappilly
DIGITAL MAILBOX
2
BLOCK DIAGRAM
Transmitter Section
MAIL-BOX
SENSOR[IR
Pair]
RF
TRANSMITTER
[FA100A]
Receiver Section
BUZZER
RF RECEIVER
[PCR2A]
MICROCONTROL
LER
LCD MODULE
[89C51]
Green Led
Red Led
IESCE Chittilappilly
DIGITAL MAILBOX
3
Sensor
In this project we use sensor as a IR Transmitter& receiver. These simple devices operates
at 940nm and work well for generic IR systems including remot control and touch-less
object sensing.using a simple ADC on any microcontroller will allow variable reading to
be collected from the detector
RF Module
The RF module, as the name suggests, operates at Radio frequency. The corresponding
frequency range varies between 30khz&300Ghz.this RF module comprises of an RF
Transmitter& an RF Receiver.this pair operates at a frequency of 434mhz. Transmitter
receives srrial data and transmit it wirelessly and receiver receive it.The transmission occur
at a rate of 1kbps-10kbps.
Mail-Box
Mail box is placed to collect mails or invitations from outside of the house. A privete box,
at a home, into which mail is delivered by the mail carrier.
LCD Module
IESCE Chittilappilly
DIGITAL MAILBOX
4
In recent years the LCD is finding widespread use replacing LEDs. A simple 16 character
display of 2 rows is connected to the circuit to show address and data at any memory
location. This LCD is also used to provide different messages to the user.
FLOWCHART
Start
No
Lette
r
arriv
al?
Yes
No
Cou
nt
15?
Yes
Indicate mail box full, on the
box full led, on buzzer &led
No
Ackno
wledge
ment?
Yes
Mail
box
open
?
IESCE Chittilappilly
DIGITAL MAILBOX
5
CIRCUIT DIAGRAM
IESCE Chittilappilly
DIGITAL MAILBOX
6
IESCE Chittilappilly
DIGITAL MAILBOX
7
IESCE Chittilappilly
DIGITAL MAILBOX
8
RECTIFIER UNIT
We have to convert AC voltage to DC using rectifier. Bridge rectifier is used. This o/p
voltage often rectifier is in rippled form, so we have to remove ripples from DC voltage.
The diodes are 1N4007.
INPUT FILTER
Capacitor acts as filter. The principle of the capacitor is charging and discharging. It
charges in the positive half cycle of the AC voltage and it will discharge in the negative
half cycle. So this allows only AC voltage and does not allow the DC voltage. This filter is
fixed before the regulator. The capacitor used here is 1000 uF, 25V.
REGULATOR UNIT
Regulator regulates the o/p voltage constant depends on upon the regulator. The regulator
used is 7805 for positive 5V regulation. It has 3 pins.
1. input pin
2. ground pin
3. output pin
OUTPUT FILTER
Capacitor acts as filter. The principle of the capacitor is charging and discharging. It
charges in positive half cycle of the AC voltage an it will discharge in negative half cycle.
So it allow only allows AC voltage and does not allow the DC voltage. This filterer fixed
after the regulator. The capacitor used here is a 1uF.
IESCE Chittilappilly
DIGITAL MAILBOX
9
IESCE Chittilappilly
DIGITAL MAILBOX
10
supports two software selectable power saving modes. The Idle Mode stops the CPU while
allowing the RAM, timer/counters, serial port and interrupt system to continue functioning.
The Power-down Mode saves the RAM contents but freezes the oscillator disabling all
other chip functions until the next hardware reset.
IESCE Chittilappilly
DIGITAL MAILBOX
11
Pin Description:
VCC: Supply voltage.
GND: Ground.
Port 0: 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. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode P0
has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and
outputs the code bytes during program verification. External pull-ups are required during
program verification.
Port 1: Port 1 is an 8-bit bi-directional 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. As inputs, Port 1 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups. Port
1 also receives the low-order address bytes during Flash programming and verification.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
12
Port 2: Port 2 is an 8-bit bi-directional 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. As inputs, Port 2 pins that are
externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 3: 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 and can be used as inputs. As inputs, Port 3 pins that are
externally being pulled low will source current (IIL) because of the pull-ups.
Port 3 also serves the functions of various special features of the AT89C51 as listed below:
Port pins and their alternate functions
RST: Reset input. A high on this pin for two machine cycles while the oscillator is running
resets the device.
ALE/PROG: Address Latch Enable output pulse for latching the low byte of the address
during accesses to external memory. This pin is also the program pulse input (PROG)
during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6the
oscillator frequency, and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external Data Memory.
If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH.
With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has no effect if the micro controller
is in external execution mode.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
13
PSEN: Program Store Enable is the read strobe to external program memory. When the
AT89C51 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to
external data memory.
EA/VPP: 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.
Note, however, that if lock bit 1 is programmed, EA will be internally latched on
reset. EA should be strapped to VCC for internal program executions. This pin also
receives the 12-volt programming enable voltage (VPP) during Flash programming, for
parts that require 12-volt VPP.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.
XTAL2: Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier, which can be configured for use as an on-chip oscillator. Either a quartz crystal
or ceramic resonator may be used. To drive the device from an external clock source,
XTAL2 should be left unconnected while XTAL1 is driven. There are no requirements on
the duty cycle of the external clock signal, since the input to the internal clocking circuitry
is through a divide-bytwo flip-flop, but minimum and maximum voltage high and low time specifications must
be observed.
Atmel Corporations AT89C51is a low-power, high-performance CMOS 8-bit
microcomputer with 4K bytes of Flash programmable and erasable read only memory
(PEROM). The device is manufactured using Atmels high-density nonvolatile memory
technology and is compatible with the industry-standard MCS-51 instruction set and pin
out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a
conventional on volatile memory programmer. By combining a versatile 8-bit CPU with
Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer that provides
a highly flexible and cost-effective solution to many embedded control applications.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
14
Flash memory can be erased in seconds compared to 20 minutes needed for 8751.
For this reason 89C51 is used in place of 8751 to eliminate the waiting time needed to
erase the chip and thereby speed up the development time. The development system
requires a ROM burner that supports flash memory. The entire contents of ROM should be
erased in order to program it again; the PROM burner itself does this. The 89C51 Flash
reliably stores memory contents even after 10,000 erase and program cycles. AT89C51 is a
popular chip of this category from Atmel Corporation.
IESCE Chittilappilly
DIGITAL MAILBOX
15
The heart of 89C51 is the circuitry that generates the clock pulses by which all
internal operations are synchronized. Pins XTAL1 and XTAL2 are provided for connecting
a resonant network to form an oscillator. The crystal frequency is the basic internal clock
frequency of the micro controller.
Program Counter and Data Pointer
The 89C51 contains two 16 bit registers, the program counter and the data counter.
Each is used to hold the address of byte in memory. Program instruction byte is fetched
from location in memory that is addressed by the PC. The PC is automatically incremented
after every instruction bytes fetched and may also be altered by certain instructions.
The DPTR register is made up of two 8-bit registers named DPH and DPL, which
are used to furnish memory addresses for internal and external code access and external
access. The DPTR is under the control of program instructions.
A & B CPU registers
The A and B register holds results of many operations, particularly math and logical
operations. The A register is also used for all data transfers between the 89C51 and any
external memory.
Flags & Program Status Word
Flags are 1 bit registers provided to store the result of certain program instructions.
The flags are groups inside the program status word and the power control (PCON)
registers. The 89C51 have four math flags that respond automatically to the result of math
operation and three general-purpose user flags that can be set to 1 or cleared to 0 by the
programmer as desired. The math flag include carry (C), Auxiliary Carry (AC), Overflow
(OV) and Parity (P). User flags are named F0, GF0 and GF1; they are general purpose
flags hat may be used by the programmer to record some event in the program. The
program status word contains the math flag, user program flag F0, and the register select
bits identify which of the four general purpose register banks is currently in use by the
program.
Internal Memory
The 89C51 have internal RAM for program code bytes and for variable data that
can be altered as the program runs. Additional memory can be added externally using
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
16
suitable circuits. Unlike micro-controller with a Von Neumann architecture, which can use
a single memory address for either program code or data, but not for both, the 89C51 have
Harvard architecture, which uses the same address, in different memories, for code and
data. Internal security accesses the correct memory based on the nature of operation in
progress.
Internal RAM
It had 128 internal RAM, which is organized, into distinct areas. 32 bytes from
address 00H to 1FH that make up thirty two working registers organized as four bands of
eight registers each. A bit addressable area of sixteen bytes occupies ram byte addresses
20H to 2FH. A general purpose RAM area above the bit area from 30H to 7FH addressable
as bytes.
Stack and Stack Pointer
The stack refers to an area of internal ram that is used in conjunction with certain
op codes to store and retrieve data quickly. The eight-bit stack pointer register is used to
hold an internal ram address called the top of the stack. The address held in the SP register
is the location in the internal ram where the last byte of data was stored by a stack
operation.
When data is to be placed on the stack the SP increments before storing data on the
stack up grows, as data is stored. As data is retrieved from the stack, the byte is read from
the stack, and then the SP decrements to point to the next available byte of stored data. The
SP is set to 07H when the 89C51 is reset and can be changed to any internal ram addressed
by the programmer.
Special Function Registers
The 89C51 operations that do not use the internal ram address from 00H to 7FH are
done by a group of specific internal registers each called special function registers, which
may be addressed much like internal ram, using addresses from 8011 to FFH. Some SFRs
are also bit addressable. This feature allows the programmer to change only what needs to
be altered, leaving the remaining bits in that SFR unchanged.
Input/Output pins, Ports and Circuits
IESCE Chittilappilly
DIGITAL MAILBOX
17
One major feature of a micro-controller is the versatility built into the IO circuits
that connect the 89C51 to external world. Four ports are provided in 89C51 to connect to
the outside world. Different functions are associated with a single port. The function of a
port is decided by a hardware circuit connected and software commands used to program it
under the complete control of a program designer.
Each port has a D type output latch for each pin. The SFR of each port are made up
of these eight latches, which can be addressed at the SFR address for that port. The port
latch should not be confused with the port pins. The data on the latch does not have to be
the same as that on the pins. The status of each latch may be read from a latch buffer; while
an input buffer is connected directly to each pin status may be read independently of the
latch state. Different op codes accesses the latch or pin states as appropriate. Port operation
is determined by manner in which microcontroller is connected to the external circuitry.
The two data paths are shown in figure while circuits that read the latch or pin data
using two entirely separate buffers. The output buffer is enabled when the latch data is read
and the lower buffer when the pin state is read.
Programmable port pins have completely different alternate functions. The
configuration of the control circuitry between the output latch and the port pins determines
the nature of any particular port pin function. Only one port cannot have alternate function.
Port 0, 2, 3 can be programmed.
Port0: serves as input/output or bidirectional lower order address and data bus for external
memory.
Port1: have no dual functions. It can be used as input/output.
Port2: serves as input/output or bidirectional higher order address and data bus for external
memory.
Port3: can be used as input/output, for serial communication and various other alternative
uses. The port3 alternate uses are given below
IESCE Chittilappilly
DIGITAL MAILBOX
18
Pin
Alternate Use
SFR
P3.0 RXD
SBUF
P3.1 TXD
SBUF
P3.2 INT0
External interrupt 0
TCON.1
P3.3 INT1
External interrupt 1
TCON.3
P3.4 T0
TMOD
P3.5 T1
TMOD
P3.6 WR
P3.7 RD
IESCE Chittilappilly
DIGITAL MAILBOX
19
The timers have been included on the chip to relieve the processor of timing and
counting chores. When the program wished to count a certain number of internal pulses or
external events, a number is placed in one of the counters. The number represents the
maximum count less the decide count, plus 1.The counter increments from the initial
number to the maximum and then roles over to 0 on the final pulse and also set a timer
flag. The flag condition may be tested by an instruction to tell the program that the count
has been accomplished, or the flag may be used to interrupt the program.
IESCE Chittilappilly
DIGITAL MAILBOX
20
RF MODULE
An RF module (radio frequency module) is a (usually) small electronic circuit used
to transmit and/or receive radio signals on one of a number of carrier frequencies. RF
modules are widely used in electronic design owing to the difficulty of designing radio
circuitry. Good electronic radio design is notoriously complex because of the sensitivity of
radio circuits and the accuracy of components and layouts required to achieve operation on
a specific frequency. Design engineers will design a circuit for an application which
requires radio communication and then "drop in" a radio module rather than attempt a
discrete design, saving time and money on development.
RF modules are most often used in medium and low volume products for
consumer applications such as garage door openers, wireless alarm systems, industrial
remote controls, smart sensor applications, and wireless home automation systems. They
are sometimes used to replace older infra red communication designs as they have the
advantage of not requiring line-of-sight operation.
Several carrier frequencies are commonly used in commerciallyavailable RF modules, including 433.92 MHz, 315 MHz, 868 MHz and
915 MHz. These
frequencies
national
and
Applications:
Vehicle monitoring
Remote control
Telemetry
Area paging
IESCE Chittilappilly
DIGITAL MAILBOX
21
RF Transmitter
An RF transmitter module is a small PCB sub-assembly capable of
transmitting a radio wave and modulating that wave to carry data.
Transmitter modules are usually implemented alongside a micro
controller which will provide data to the module which can be
transmitted. it is also a part of transreceiver.
FS100A[Transmitter Module]:-
transmit signal up to 100 meters (the antenna design, working environment and supply
voltage will seriously impact the effective distance). It's good for short distance, battery
power device development.
Key Benefits, FS1000A Wireless Radio Transmitting Module:
RF Receiver
An RF receiver module is capable of receving a signal from the
transmitter section.most cases the receiver section must be placed
adjustant to the microcontroller
IESCE Chittilappilly
DIGITAL MAILBOX
22
FIG:
Transmitter&Receiver Module[FS100A&PCR2A]
.
RF Transmitter
Pin
No
1
2
3
4
Function
Name
Ground (0V)
Serial data input pin
Supply voltage; 5V
Antenna output pin
Ground
Data
Vcc
ANT
IESCE Chittilappilly
DIGITAL MAILBOX
23
RF Receiver
Pin
No
1
2
3
4
5
6
7
8
Function
Name
Ground (0V)
Serial data output pin
Linear output pin; not connected
Supply voltage; 5V
Supply voltage; 5V
Ground (0V)
Ground (0V)
Antenna input pin
Ground
Data
NC
Vcc
Vcc
Ground
Ground
ANT
Encoder
An Encoder is a device, circuit, transducer, software program,
algorithm or person that der:-information from one format der:-another,
for the purposes of standardization, speed, secrecy, security or
compressions.
HT12E Encoder IC:- HT12E is a 2^12 series encoder IC widely used in remote control
and very common among Radio Frequency RF applications. This HT12E IC capable of
converting 12 bit Parallel data inputs into serial outputs. These bits are classified into 8
(A0-A7) address bits and 4(AD0-AD3) data bits. Using the address pins we can provide 8
bit security code for secured data transmission between the encoder and the decoder.
The encoder and decoder should use the same address and data format. HT12E is
capable of operating in a wide Voltage range from 2.4V to 12V and also consists of a built
in oscillator. .
IESCE Chittilappilly
DIGITAL MAILBOX
24
Decoder
A Decoder is a device which does the reverse operation of an encoder, undoing the
encoding so that the original information can be retrieved. The same method used to
encode is usually just reversed in order to decode. It is a combinational circuit that converts
binary information from n input lines to a maximum of 2n unique output lines.
HT12D Decoder IC:- HT12D is a decoder integrated circuit that belongs to 212 series of
decoders. This series of decoders are mainly used for remote control system applications,
like burglar alarm, car door controller, security system etc. It is mainly provided to interface
RF and infrared circuits. They are paired with 212 series of encoders. The chosen pair of
encoder/decoder should have same number of addresses and data format.
In simple terms, HT12D converts the serial input into parallel outputs. It decodes
the serial addresses and data received by, say, an RF receiver, into parallel data and
sends them to output data pins. The serial input data is compared with the local
addresses three times continuously. The input data code is decoded when no error or
unmatched codes are found. A valid transmission in indicated by a high signal at VT pin.
IESCE Chittilappilly
DIGITAL MAILBOX
25
IESCE Chittilappilly
DIGITAL MAILBOX
26
IR SENSOR
An infrared sensor is an electronic instrument that is used to sense certain
characteristics of its surroundings by either emitting and/or detecting infrared radiation. It
is also capable of measuring heat of an object and detecting motion. Infrared waves are not
visible to the human eye.
In the electromagnetic spectrum, infrared radiation is the region having wavelengths
longer than visible light wavelengths, but shorter than microwaves. The infrared region is
approximately demarcated from 0.75 to 1000m. The wavelength region from 0.75 to 3m
is termed as near infrared, the region from 3 to 6m is termed mid-infrared, and the region
higher than 6m is termed as far infrared.
Infrared technology is found in many of our everyday products. For example, TV has
an IR detector for interpreting the signal from the remote control. Key benefits of infrared
sensors include low power requirements, simple circuitry, and their portable feature.
Working Principle
A typical system for detecting infrared radiation using infrared sensors includes the
infrared source such as blackbody radiators, tungsten lamps, and silicon carbide. In case of
active IR sensors, the sources are infrared lasers and LEDs of specific IR wavelengths.
Next is the transmission medium used for infrared transmission, which includes vacuum,
the atmosphere, and optical fibers.
Thirdly, optical components such as optical lenses made from quartz, CaF 2, Ge and
Si, polyethylene Fresnel lenses, and Al or Au mirrors, are used to converge or focus
infrared radiation. Likewise, to limit spectral response, band-pass filters are ideal.
Finally, the infrared detector completes the system for detecting infrared radiation.
The output from the detector is usually very small, and hence pre-amplifiers coupled with
circuitry are added to further process the received signals.
IR Sensors work by using a specific light sensor to detect a select light wavelength
in the Infra-Red (IR) spectrum. By using an LED which produces light at the same
wavelength as what the sensor is looking for, you can look at the intensity of the received
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
27
light. When an object is close to the sensor, the light from the LED bounces off the object
and into the light sensor. This results in a large jump in the intensity, which we already
know can be detected using a threshold.
1
1. Infrared Source
All objects above 0 K radiate infrared energy and hence are infrared
sources. Infrared sources also include blackbody radiators, tungsten lamps, silicon
carbide, and various others. For active IR sensors, infrared Lasers and LEDs of
specific IR wavelengths are used as IR sources.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
28
2.Transmission Medium
Three main types of transmission medium used for Infrared transmission
are vacuum, the atmosphere, and optical fibers.
The transmission of IR radiation is affected by presence of CO2, water vapour
and other elements in the atmosphere. Due to absorption by molecules of water
carbon dioxide, ozone, etc. the atmosphere highly attenuates most IR wavelengths
leaving some important IR windows in the electromagnetic spectrum; these are
primarily utilized by thermal imaging/ remote sensing applications.
Photosensitivity or Responsivity
Responsivity is the Output Voltage/Current per watt of incident energy. Higher the
better.
IESCE Chittilappilly
DIGITAL MAILBOX
29
NEP represents detection ability of a detector and is the amount of incident light
equal to intrinsic noise level of a detector.
Detectivity(D*: D-star)
4.1.
LCD INTERFACE
In recent years the LCD is finding widespread use replacing LEDs. A simple 16
character display of 2 rows is connected to the circuit to show address and data at any
memory location. This LCD is also used to provide different messages to the user. The pin
details of LCD are as follows: VCC and VSS provide +5V and GND respectively, while
VEE is used for controlling LCD contrast. The VEE is connected to GND.
Pin Diagram
IESCE Chittilappilly
DIGITAL MAILBOX
30
Fig8.Pin diagram of LCD
There are two important registers inside the LCD. The RS pin is used for their
selection. If RS = 0, the instruction command code register selected, allowing the user to
send commands such as clear display, cursor at home, etc. If RS=1, the dare register is
selected, allowing user to send data to be displayed on the LCD. The register select line
connected to PIN 27 (P2.6 or A14) of AT89C51. The programmer can make this line either
1 or 0 according to the register to be selected.
The R/W input allows the user to write information to the LCD or read information
from it. R/W=1 when reading and, R/W=0 when writing. In our system only writing is
performed and this pin is connected to ground. The enable pin is used to latch information
presented to its data pins. When data is supplied to data pins a High to Low pulse must be
applied to this pin in order for the LCD to latch interfacing the data present at data pins.
This
pulse must be a minimum of 450ns. The EN pin is connected to Pin number 28 (P2.7 or
A15) of AT89C51. The programmer can toggle this line during the LCD operation.
The eight bit data pins, D0-D7, are used to send information to the LCD or read
contents of the LCDs internal registers. To display letters and numbers we send ASCII
codes for the letters A-Z, a-z, numbers 0-9 to these pins while making RS=1. This data pins
are connected to Port 0 of AT89C51. The pin 15 and 16 pin of LCD module is used as
supply pins of backlight. A+5v is connected to pin 15 and pin 16 is grounded. There are
also instruction commands codes that can be send to the LCD to clear the display or
shifting the display etc. These command codes are send to the LCD by making the RS=0.
BUZZER
Piezo buzzer is an electronic device commonly used to produce sound. Light
weight, simple construction and low price make it usable in various applications
like car/truck reversing indicator, computers, call bells etc. Piezo buzzer is based
on the inverse principle of piezo electricity discovered in 1880 by Jacques and
Pierre Curie. It is the phenomena of generating electricity when mechanical
pressure is applied to certain materials and the vice versa is also true.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
31
Such materials are called piezo electric materials. Piezo electric materials are
either naturally available or manmade. Piezoceramic is class of manmade
material, which poses piezo electric effect and is widely used to make disc, the
heart of piezo buzzer. When subjected to an alternating electric field they stretch
or compress, in accordance with the frequency of the signal thereby producing
sound. The above image shows a very commonly used piezo buzzer also called
piezo transducer operating at DC voltage. Encapsulated in a cylindrical plastic
coating, it has a hole on the top face for sound to propagate. A yellow metallic disc
which plays an important role in the producing sound can be seen through the
hole.
LED
IESCE Chittilappilly
DIGITAL MAILBOX
32
SOFTWARE DETAILS
4.2. EMBEDDED SYSTEMS
An embedded system is a special purpose computer system, which is completely
encapsulated by the device it controls. It is called embedded because the micro controller
is inside some other system. An embedded system has specific requirements and performs
pre-defined tasks unlike a general purpose personal computer. An embedded system is a
combination of computer hardware and software and perhaps additional mechanical or
other parts, designed to perform a dedicated function.
Features of Embedded Systems
They are designed around a micro controller which integrates memory and
peripherals.
Sophisticated functionality.
Smarter products.
Smaller size.
User friendly.
IESCE Chittilappilly
DIGITAL MAILBOX
33
A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.
Vision adds many new features to the Editor like Text Templates, Quick Function
Navigation, Syntax Coloring with brace highlighting, Configuration Wizard for dialog
based startup and debugger setup.
Building an Application in Vision
To build (compile, assemble, and link) an application in Vision, you must:
1. Select Project - Open Project (for EG: \C166\EXAMPLES\HELLO\HELLO.UV2).
2. Select Project - Rebuild all target files or Build target.
Vision2 compiles, assembles, and links the files in your project.
Creating Your Own Application in Vision2
To create a new project in Vision, you must:
1. Select Project - New Project.
2. Select a directory and enter the name of the project file.
3. Select Project - Select Device and select an AT89C51 device from the Device
Database.
4. Create source files to add to the project.
5. Select Project - Targets, Groups, and Files. Add/Files, select Source Group1, and
add the source files to the project.
IESCE Chittilappilly
DIGITAL MAILBOX
34
6. Select Project - Options and set the tool options. Note when you select the target
device from the Device Database all special options are set automatically. You
typically only need to configure the memory map of your target hardware. Default
memory model settings are optimal for most applications.
IESCE Chittilappilly
DIGITAL MAILBOX
35
IESCE Chittilappilly
DIGITAL MAILBOX
36
ARES PCB Layout - PCB design system with automatic component placer, rip-up and
retry auto-router and interactive design rule checking
VSM - Virtual System Modeling lets co-simulate embedded software for popular
micro-controllers alongside hardware design.
System Benefits Integrated package with common user interface and fully context
sensitive help.
Proteus Virtual System Modeling (VSM) combines mixed mode SPICE circuit
simulation, animated components and microprocessor models to facilitate co-simulation of
complete microcontroller based designs. For the first time ever, it is possible to develop
and test such designs before a physical prototype is constructed.
This is possible because you can interact with the design using on screen indicators
such as LED and LCD displays and actuators such as switches and buttons. The simulation
takes place in real time (or near enough to it): a 1GMHz Pentium III can simulate a basic
8051 system clocking at over 12MHz. Proteus VSM also provides extensive debugging
facilities including breakpoints, single stepping and variable display for both assembly
code and high level language source.
Schematic Entry
Proteus VSM uses our proven Schematic Capture software to provide the
environment for design entry and development. ISIS is a long established product and
combines ease of use with powerful editing tools. It is capable of supporting schematic
capture for both simulation and PCB design. Designs entered in to Proteus VSM for testing
can be net listed for PCB layout either with our own PCB Design products or with third
party PCB layout tools. ISIS also provides a very high degree of control over the drawing
appearance, in terms of line widths, fill styles, fonts, etc. These capabilities are used to the
full in providing the graphics necessary for circuit animation.
IESCE Chittilappilly
DIGITAL MAILBOX
37
Circuit Simulation
At the heart of Proteus VSM is ProSPICE. This is an established product that
combines uses a SPICE3f5 analogue simulator kernel with a fast event-driven digital
simulator to provide seamless mixed-mode simulation. The use of a SPICE kernel lets you
utilise any of the numerous manufacturer-supplied SPICE models now available and
around 6000 of these are included with the package.
Proteus VSM includes a number of virtual instruments including an Oscilloscope,
Logic Analyzer, Function Generator, Pattern Generator, Counter Timer and Virtual
Terminal as well as simple voltmeters and ammeters. In addition, we provide dedicated
Master/Slave/Monitor mode protocol analysers for SPI and I2C - simply wire them onto
the serial lines and monitor or interact with the data live during simulation. Should you
wish to take detailed measurements on graphs, or perform other analysis types such as
frequency, distortion, noise or sweep analyses of analogue circuits, you can purchase
the Advanced Simulation Option. This option also includes Conformance Analysis - a
unique and powerful tool for Software Quality Assurance.
Co-Simulation of Microcontroller Software
The most exciting and important feature of Proteus VSM is its ability to simulate
the interaction between software running on a microcontroller and any analog or digital
electronics connected to it. The micro-controller model sits on the schematic along with the
other elements of your product design. It simulates the execution of your object code
(machine code), just like a real chip. If the program code writes to a port, the logic levels in
circuit change accordingly, and if the circuit changes the state of the processor's pins, this
will be seen by your program code, just as in real life. The VSM CPU models fully
simulate I/O ports, interrupts, timers, USARTs and all other peripherals present on each
supported processor. It is anything but a simple software simulator since the interaction of
all these peripherals with the external circuit is fully modeled down to waveform level and
the entire system is therefore simulated.VSM can even simulate designs containing
multiple CPUs, since it is a simple enough matter to place two or more processors on a
schematic and wire them together
IESCE Chittilappilly
DIGITAL MAILBOX
38
IESCE Chittilappilly
DIGITAL MAILBOX
39
PROGRAM
.equ com,0fch
.equ dat,0fdh
.equ eot,0feh
reset: mov sp,#30h
mov p1,#07h
mov p3,#00h
mov p0,#00h
mov p2,#00h
mov r4,#00h
mov dptr,#msg0
lcall message
lcall delay
mov dptr,#msg1
lcall message
rep:
jnb p1.0,count
jnb p1.1,reset
IESCE Chittilappilly
DIGITAL MAILBOX
40
sjmp rep
count:
inc r4
mov a,r4
cjne a,#0fh,indi
mov p1,#17h
mov dptr,#msg2
lcall message
sjmp de17
indi: setb p1.3
setb p1.5
finish:
jnb p1.0,finish
mov a,r4
lcall bcd
lcall ascii
lcall display
mov r3,#1fh
de1: mov r7,#01h
IESCE Chittilappilly
DIGITAL MAILBOX
41
IESCE Chittilappilly
DIGITAL MAILBOX
42
jnb p1.2,ack
djnz r5,de8
djnz r6,de7
djnz r7,de6
cpl p1.3
sjmp de5
ljmp reset
mov r3,#1fh
de17: mov r7,#01h
de18: mov r6,#0ffh
de19: mov r5,#0ffh
de20: jnb p1.1,reset1
jnb p1.2,ack1
IESCE Chittilappilly
DIGITAL MAILBOX
43
djnz r5,de20
djnz r6,de19
djnz r7,de18
cpl p1.3
cpl p1.5
djnz r3,de17
clr p1.5
IESCE Chittilappilly
DIGITAL MAILBOX
44
message:
lcall ready
clr a
movc a,@a+dptr
inc dptr
cjne a,#eot,comd
ret
comd:
cjne a,#com,data
clr p2.5
sjmp message
data:
cjne a,#dat,sendit
IESCE Chittilappilly
DIGITAL MAILBOX
45
setb p2.5
sjmp message
sendit:
mov p0,a
clr p2.6
setb p2.7
clr p2.7
sjmp message
ready:
mov r0,p2
clr p2.7
mov p0,#0ffh
clr p2.5
setb p2.6
wait:
clr p2.7
setb p2.7
jb p0.7,wait
IESCE Chittilappilly
DIGITAL MAILBOX
46
clr p2.7
mov p2,r0
ret
msg0:
msg1:
.db com,3ch,06h,0eh,01h,80h,dat,"NUMBER OF
MAILS",com,0C7h,dat,"00",eot
msg2:
bcd:
mov b,#0ah
div ab
mov r1,b
mov r2,a
IESCE Chittilappilly
DIGITAL MAILBOX
47
ret
ascii:
mov a,r1
anl a,#0fh
add a,#30h
mov r1,a
mov a,r2
anl a,#0fh
add a,#30h
mov r2,a
ret
display:
lcall message2
mov a,r2
IESCE Chittilappilly
DIGITAL MAILBOX
48
lcall message1
mov a,r1
lcall message1
ret
message2:
lcall ready
clr p2.5
mov p0,#0c7h
clr p2.6
setb p2.7
clr p2.7
ret
message1:lcall ready
setb p2.5
mov p0,a
clr p2.6
IESCE Chittilappilly
DIGITAL MAILBOX
49
setb p2.7
clr p2.7
ret
lcall delay1
djnz r1,d1
ret
delay1:
de9: mov r7,#01h
de10: mov r6,#0ffh
de11: mov r5,#0ffh
de12: djnz r5,de12
djnz r6,de11
djnz r7,de10
ret
IESCE Chittilappilly
DIGITAL MAILBOX
50
IESCE Chittilappilly
DIGITAL MAILBOX
51
5. FABRICATION OF PCB
5.1. PCB DESIGN
Now a days the printed circuit it board hear after mention as PBCs makes the
electronic circuit manufacturing as easy one. In olden days vast area was required to
implant a small circuit to connect the leads of the components and separate connectors
were needed. But PCBs connects the by copper coated lines on the PCB boards. In the
single sided PCBs the copper layer is on both sides. Some cases, middle layer is also
possible than the two sides.
Board Types
The most popular board types are:
Manufacturing Process
Fist, the wanted circuit is drawn on paper and it is modified or designed PCB layout is
to be on the plain copper coated board. These boards are available in two types:
Phnotolic
Glass epoxy
Most computers PCBs are glass epoxy. To draw circuit diagram we can use the black
color paints. Before that the required size of the plane PCB board is determined from the
roughly drawn PCB layout. Using black paint the desired circuit is drawn on the board.
Layout Approaches
The first rule is to prepare each and every PCB layout as viewed from the
component side. Another important rule is not to start the designing of a layout unless an
IESCE Chittilappilly
DIGITAL MAILBOX
52
absolutely clear circuit diagram is available, if necessary, with a component lists. Among
the components
requiring input/ output connection come near the connection. All components are placed in
such a manner that disordering of the components is not necessary if they have to be
replaced.
In the designing of a PCB layout it is very important to divide the circuit into
functional subunits. Each of these subunits be realized on a defined portion of the board. In
the designing the inter connections which are usually done by pencil lines, actual space
requirements in the artwork must be considered. In addition the layout can be rather
roughly sketched and will still be clear enough for artwork designer.
Board Cleaning
The cleaning of the copper surface prior to resist applications in an essential step
for any types of PCB process using etch or planting resist.
Insufficient cleanings one of the reasons most often encountered for difficulties in
PCB fabrication although it might not always be immediately recognized as this. But it is
quiet often the reasons of poor-resist adhesion, uneven photo-resist films, pinholes, poor
planit adhesion, etc. Where cleaning has to be done with simplest means or only for a
limited quantity of PCBs, manual-cleaning process is mainly used. In the process we
require just a sink with running water, pumice powder, scrubbing brushes and suitable
tanks.
Plating
This process is particularly suitable for large production schemes. However the
preparation of a screen can also be economically attractive for series of 1000 PCBs. Below,
while photo printing is basically the non-accurate method to transfer a pattern on to a board
surface. With the screen-printing process one can produce PCBs with a conduction of as
low as 0.5 + or and a registration error of 0.1mm on an industrial scale with a high
reliability.
Plating
From a practical stand port, printed circuit boards may have to be stocked before being
taken for assembly of components. It is expected that the circuit board retain its solder
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
53
ability for long periods of several months so that reliable solder joints can be produced
during
Immersion plating
Electroless plating
Electroplating
Etching
This can be done both by manual and mechanical ways by immersing the board
onto a solution of formic chloride and finally cleaning the board by soap.
In all subtractive PCB process, etching is one of the most important steps. The
copper pattern is formed by selective removal of all unwanted copper, which is not
protected by an etch resist. This looks very simple at first glance but in practice there are
factors like under etching and overhang which complicate the matter especially in the
production of fine and highly precise PCBs. Etching of PCBs as required in modern
electronic equipment production, is usually done in spray type etching machines.
Components Placing
The actual location of components in the layout is responsible foe the problems to
be placed during routing of the interconnections. In a highly sensitive circuit the critical
components are placed first and in such a manner as to require minimum length for the
critical conductors. In less critical circuit the components are arranged exactly in the order
of signal flow. This will result in a minimum overall conductor length. In a circuit where a
few components are placed first and the reaming ones are grouped around them.
The general result to be aimed at is always to get shortest possible
interconnections. The bending of the axial component leads is done in a manner to
guarantee an optimum retention of the component of the PCB. The lead bending radius
should be approximately two times the lead diameter. Horizontally mounted resistors must
touch the board surface to avoid lifting of solder joints along with the copper pattern under
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
54
pressure on the resistor body. Vertically mounted resistors should not be flush to the board
surface to avoid strain on the solder joints as well as on the component lead junction due to
different thermal expansion
coefficients of lead and board materials, where necessary resilient spaces to be provided.
Coated or sealed components should to be mounted in such to provide a certain length
along the leads.Especially when plated through holes where the solder flows up in the hole,
clean lead of at least 1mm above the board are recommended.
Drilling
Drilling of the component mounting holes into PCBs by far the most important
mechanical machining operation in PCB production process. Holes are made by drilling
wherever a superior holes finish for plated-through holes processes is required and where
the tooling costs for a punching tool cannot be justified. Therefore drilling is applied for all
the professional grade PCB manufactures and generally in smaller PCB production
laboratories. The importance of holes drilling into PCB has further gone up with electronic
component miniaturization and it needs smaller hole diameters and higher package density
where hole punching is practically ruled out.
Soldering
Soldering is a process for the joining of metal parts with the aid of a molten
metal(solder), where the melting temperature is suited below that of the material joined,
and whereby the surface of the parts are wetted, without then becoming molten.
Soldering generally implied that the joining process occurs at temperatures below
450-degree centigrade. Solder west and alloys with the base metals and gets drawn, by a
capillary action, into the gap between them. This process forms a metallurgical bond
between the parts of the joint. Therefore soldier acts by Wetting of base metal surfaces
forming joint flowing between these surfaces, which result in a completely filled space
between them. Metallurgical bonding to this surface when soldered. Soldering consists of
the relative positioning of the surfaces to be joined, wetting these surfaces with molten
solder and allowing the solder to cool down unit it has solidified. During this soldering
operation, an auxiliary medium is mostly used to increase the flow properties of molten
solder or to improve the degree of wetting. Such a medium is called flux.
Dept. Of Applied Electronics & Instrumentation
IESCE Chittilappilly
DIGITAL MAILBOX
55
It should dissolve any oxide on the metal surfaces or on the solder and carry
such unwanted elements away.
It should be readily displaced from the metal by the molten soldering operation.
soldered joint the solder and the base metal must be heated above the melting point of the
solder used. The method by which the necessary heat is applied, among other thing
depends on
Flux
Generally applied soldering methods are iron soldering, torch soldering, mass
soldering, electrical
Soldering furnace soldering and other methods. Components are basically mounted
only one said of the board. In double-sided PCBs, the component side is usually opposite
to the major conductor pattern side, unless otherwise dictated by special design
requirements. The performance and reliability of solder joints give best result covered with
solder and herewith contributing to the actual solder connections. However, lead cutting
after soldering is still common in particular in smaller industries where hand soldering is
used. With the soldered PCB many contaminants can be found which may produce.
Difficulties with the functioning of the circuit. The problems usually arise at a much later
than during the final functioning testing of the board in the factory. Among the
contaminants, we can typically find flux chips of plastics, metals and other constructional
materials, plating sails, oils greases environmental soil and other processing materials.
IESCE Chittilappilly
DIGITAL MAILBOX
56
The following performances are expected from the cleaning procedure with the
appropriate cleaning medium:
Dissolution or dissolving of organic liquids and solids, e.g., oils, greases, resin
flux.
Displacing of particulate and other insoluble matters, e.g., chips, dust, and lint.
CAD In Lab
First the PCB layout is designed by ORCAD. This printout is taken from the
computer (of large size) for out clearance. This layer is given to the photography section to
get the layout. This photographic image is exposed in the following three methods:
Polybluem
Chrombium
Five star
The exposed mesh is placed on plain copper coated board in correct alignment by
using wooden clamps paint flow through the board and the layout lines are made on the
boards.
IESCE Chittilappilly
DIGITAL MAILBOX
57
PCB ARTWORK
IESCE Chittilappilly
DIGITAL MAILBOX
58
1.PCB LAYOUT
IESCE Chittilappilly
DIGITAL MAILBOX
59
IESCE Chittilappilly
DIGITAL MAILBOX
60
IESCE Chittilappilly
DIGITAL MAILBOX
61
8. BIBILOGRAPHY
IESCE Chittilappilly
DIGITAL MAILBOX
62
IESCE Chittilappilly
DIGITAL MAILBOX
63
IESCE Chittilappilly