Digital Dash Board Automission

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 72

DIGITAL DASH BOARD AUTOMATION

PROJECT REPORT 2014-2015

Submitted by:
(team name)

COLLEGE LOGO

Guided by:

Submitted in partial fulfillment of the requirement for the


Award of Diploma in -----------------------------------------
By the State Board of Technical Education Government of
Tamilnadu, Chennai.

Department:
College name:
Place:
COLLEGE NAME

COIMBATORE

DEPARTMENT
PROJECT REPORT-2014-2015

This Report is certified to be the Bonafide work done by


Selvan/Selvi ---------------- Reg.No.------------ of VI Semester
class of this college.

Guide Head of the Department

Submitter for the Practical Examinations of the board of


Examinations,State Board of Technical Education,Chennai,
TamilNadu.On --------------(date) held at the ------------(college
name),Coimbatore
Internal Examiner External Examiner
DEDICATED TO OUR BELOVED
PARENTS
ACKNOWLEDGEMENT
ACKNOWLEDGEMENT

At this pleasing movement of having successfully completed our project, we


wish to convey our sincere thanks and gratitude to the management of our college
and our beloved chairman------------------------.who provided all the facilities to us.

We would like to express our sincere thanks to our principal


------------------for forwarding us to do our project and offering adequate duration
in completing our project.

We are also grateful to the Head of Department prof…………., for her/him


constructive suggestions &encouragement during our project.

With deep sense of gratitude, we extend our earnest &sincere thanks to our
guide --------------------, Department of Mechanical for her/him kind guidance and
encouragement during this project we also express our indebt thanks to our
TEACHING staff of MECHANICAL ENGINEERING DEPARTMENT, ----------
(college Name).
DIGITAL DASH BOARD AUTOMATION
CONTENTS
CONTENTS

CHAPTER No TITLE
ABSTRACT
1 INTRODUCTION
HARDWARE
2 BLOCK DIAGRAM
3 BLOCK DIAGRAM DESCRIPTION
4.1 ABOUT MICROCONTROLER
4.2 LIQUID CRYSTAL DISPLAY
4.3 TEMPERATURE SENSOR
5 OVERALL CIRCUIT DIAGRAM
6 OVERALL CIRCUIT DIAGRAM DESCRIPTION
6.1 POWER SUPPLY CIRCUIT
6.2 MICROCONTROLLER CIRCUIT
6.3 TEMPERATURE SENSOR
6.4 PRESSURE SENSOR
6.5 SPEED SENSOR
6.6 FLOAT SENSOR
6.7 BATTERY
7 PCB DESIGN
7.1 INTRODUCTION
7.2 SOFTWARE
7.3 MANUFACTURING
7.4 PANELISATION
7.5 PLATING
7.6 ETCHING
7.7 SOLDER MASK
7.8 HOT AIR LEVELING
SOFTWARE
8 SOFTWARE TOOLS
8.1 MPLAB
8.2 MPLAB SIMULATOR
8.3 ICPROG
8.4 COMPILER HI-TECH C
8.5 PIC START PLUS PROGRAMMER
9 PROGRAM
10 ADVANTAGES
11 APPLICATIONS
12 CONCLUSION
13 REFERENCES
1. ABSTRACT Introduction:
This project is analyzing the vehicle performance. In the recent
years, the electronic devices do all part of task automatically and the
technologies are embedded to it. In each and every field the need of
automation goes an increasing. In textile, automobile and all regions
the fastest technology is growing up. Here in this project we are
implementing the small idea behind the automation in the automobile
by analyzing first its performance and next involving us to bring out
the embedded automobile. However here it is dealt with performance
only.
Scope of project:
This project is to analyze vehicle status
through microcontroller with help of external hardware device and
sensors.
Brief methodology:
This project is designed with
 Microcontroller(Ateml/PIC/Renesas/ARM)
 LCD display
 Temperature sensor
 Pressure sensor
 Fuel sensor
 Speed sensor
 SCU
 Matrix keypad
 Amplifier
 ADC
The whole setup is to be placed on the dashboard of the vehicle.
In this block the speed of the wheel, the battery failure or indication is
done along with which the fuel level is also included, temperature of
engine then pressure of oil. We are able to calculate the distance
covered by the vehicle. Moreover the speed of the vehicle is
calculated in kilometer /hour by using some mathematical calculation.
Here we used thermister to sense temperature. It has
negative temperature co-efficient. That is when the temperature
increases automatically the resistance will decrease. It has a lot of
advantages over the conventional instruments used for measurement.
The output of thermister is given to ADC then processed and
displayed in LCD.
In this project the tank consists of a float sensor which is special
type of sensor in which the resistance value is varied depending upon
the liquid level. The variable resistance obtained from the float sensor
is converted into variable voltage signal through voltage converter
circuit. The converted voltage signal is given into the amplifier in
order to amplify the voltage signal. Then the amplified voltage signal
is given to ADC.
ADC is nothing but Analog to Digital Converter which converts the
analog signal from the float sensor to corresponding digital signal.
Then the converted digital signal is given to microcontroller. The
microcontroller displayed in LCD display.
The pressure is measured with the help of the pressure sensor; the
sensed electrical output signal is given to an amplifier unit. The amplifier
signal is then given to ADC. The voltage output will be amplified with
the help of a suitable amplifier up to the voltage level of 0 to 5 volts DC.
Then the DC output will be fed to the analog to digital converter, and then
it will give eight bit data to the micro controller.
The speed and distance of a vehicle can be monitored easily with the
help of speed sensor. There are many types of speed sensors are available.
Proximity sensor is the best one to measure the speed of the car. The
proximity sensor will work with magnetic pick up i.e., the metal piece of the
tyre drum should cut the flux in between the wheel & sensor for each
rotation. For one rotation one pulse will be taken and then the output will be
given to a microcontroller, and the microcontroller output will be calculated
for a minute & hour we can calculate the KMPH & the distance. For this we
need a timer programming concept in a microcontroller. Then it will display
in LCD.

2. INTRODUCTION

The room temperature is sensed by using thermistor. As the temperature


increase the resister value is the thermistor decrease and vice versa. The sensed signal
is given to bridge circuit. The variation in the resistance value causes the bridge to be in
unable condition. The output signal from the bridge circuit is given to amplifier circuit for
further amplification.

The amplified signal is given to A/D converter. The signal is given to


microcontroller, Microcontroller compares the temperature value in the algorithm
specified and delivers the corresponding signal to relay in which speed it should move.
If suppose the temperature is 32 degree, then the relay should be in 4 th position, so that
the fan movement is controlled according to the existing temperature.

If suppose the temperature is 30 degree, then the relay should be in 3 rd position,


so that the fan movement is controlled according to the existing temperature. If suppose
the temperature is 28 degree, then the relay should be in 2 nd position, so that the fan
movement is controlled according to the existing temperature. This is how our
temperature controlled system works out.
3. BLOCK DIAGRAM
4. BLOCK DIAGRAM DESCRIPTION

4. 1 MICROCONTROLLER

INTRODUCTION TO MICROCONTROLLER

Microcontrollers are destined to play an increasingly important role in

revolutionizing various industries and influencing our day to day life more strongly than

one can imagine. Since its emergence in the early 1980's the microcontroller has been

recognized as a general purpose building block for intelligent digital systems. It is

finding using diverse area, starting from simple children's toys to highly complex

spacecraft. Because of its versatility and many advantages, the application domain has

spread in all conceivable directions, making it ubiquitous. As a consequence, it has

generate a great deal of interest and enthusiasm among students, teachers and

practicing engineers, creating an acute education need for imparting the knowledge of

microcontroller based system design and development. It identifies the vital features

responsible for their tremendous impact, the acute educational need created by them

and provides a glimpse of the major application area.

MICROCONTROLLER

A microcontroller is a complete microprocessor system built on a single IC.

Microcontrollers were developed to meet a need for microprocessors to be put into low

cost products. Building a complete microprocessor system on a single chip substantially

reduces the cost of building simple products, which use the microprocessor's power to
implement their function, because the microprocessor is a natural way to implement

many products. This means the idea of using a microprocessor for low cost products

comes up often. But the typical 8-bit microprocessor based system, such as one using a

Z80 and 8085 is expensive. Both 8085 and Z80 system need some additional circuits to

make a microprocessor system. Each part carries costs of money. Even though a

product design may requires only very simple system, the parts needed to make this

system as a low cost product.

To solve this problem microprocessor system is implemented with a single chip

microcontroller. This could be called microcomputer, as all the major parts are in the IC.

Most frequently they are called microcontroller because they are used they are used to

perform control functions.

The microcontroller contains full implementation of a standard

MICROPROCESSOR, ROM, RAM, I/0, CLOCK, TIMERS, and also SERIAL PORTS.

Microcontroller also called "system on a chip" or "single chip microprocessor system" or

"computer on a chip".

A microcontroller is a Computer-On-A-Chip, or, if you prefer, a single-chip

computer. Micro suggests that the device is small, and controller tells you that the

device' might be used to control objects, processes, or events. Another term to describe

a microcontroller is embedded controller, because the microcontroller and its support

circuits are often built into, or embedded in, the devices they control.

Today microcontrollers are very commonly used in wide variety of intelligent

products. For example most personal computers keyboards and implemented with a

microcontroller. It replaces Scanning, Debounce, Matrix Decoding, and Serial


transmission circuits. Many low cost products, such as Toys, Electric Drills, Microwave

Ovens, VCR and a host of other consumer and industrial products are based on

microcontrollers.

EVOLUTION OF MICROCONTROROLLER

Markets for microcontrollers can run into millions of units per application. At these

volumes of the microcontrollers is a commodity items and must be optimized so that

cost is at a minimum. .Semiconductor manufacturers have produced a mind-numbing

array of designs that would seem to meet almost any need. Some of the chips listed in

this section are no longer regular production, most are current, and a few are best

termed as "smoke ware": the dreams of an aggressive marketing department.

Sl.No
Manufacturer Chip Year No. No RAM ROM Other
Designation of of Features
Pins I/O
4 Bit MC
1. Texas TMS 1000 Mid 28 23 64 1K LED
Instruments 1970 Display
2. Hitachi HMCS 40 - 28 10 32 512 10 bit
ROM
3. Toshiba TLCS 47 - 42 35 128 2K Serial bit
I/O
8 bit MC
1. Intel 8048 1976 40 27 64 1K External
Memory
8K
2 Intel 8051 1980 40 32 128 4K External
Memory
128 K
3. Motorola 6081 1977 - 31 128 2K
4. Motorola 68HC11 1985 52 40 256 8K Serial
Port,
ADC,
5. Zilog Z8 - 40 32 128 2K External
Memory
128K,
16 Bit MC
1. Intel 80C196 - 68 40 232 8K External
Memory
64K,
Serial
Port,
ADC,
WDT,
PWM
2. Hitachi H8/532 - 84 65 1K 32K External
Memory
1M,
Serial
Port,
ADC,
PWM
3. National HPC16164 - 68 52 512 16K External
Memory
64K,
ADC,
WDT,
PWM
32 Bit MC
1. Intel 80960 - 132 20 MHz clock, 32 bit bus, 512
byte instruction cache
APPLICATION

Microcontrollers did you use today?

A microcontroller is a kind of miniature computer that you can find in all kinds of

Gizmos. Some examples of common, every-day products that have microcontrollers are

built-in. If it has buttons and a digital display, chances are it also has a programmable

microcontroller brain.

Every-Day the devices used by ourselves that contain Microcontrollers. Try to

make a list and counting how many devices and the events with microcontrollers you

use in a typical day. Here are some examples: if your clock radio goes off, and you hit

the snooze button a few times in the morning, the first thing you do in your day is

interact with a microcontroller. Heating up some food in the microwave oven and

making a call on a cell phone also involve operating microcontrollers. That's just the

beginning. Here are a few more examples: Turning on the Television with a handheld

remote, playing a hand held game, Using a calculator, and Checking your digital wrist

watch. All those devices have microcontrollers inside them, that interact with you.

Consumer appliances aren't the only things that contain microcontrollers. Robots,

machinery, aerospace designs and other high-tech devices are also built with

microcontrollers.
BLOCK DIAGRAM OF MICROCONTROLLER

EXTERNAL COUNTER
INTERRUPTS INPUTS

ETC.

ON- TIMER 1
ON-CHIP
INTERRUPT CHIP RAM
CONTROL ROM TIMER 0

CPU

BUS SERIAL
OSC
OSC CONTROL 4 I/O PORTS
PORT

P0 P2 P1 P3 XD RXD
ADDRESS/DATA
PIC
The microcontroller that has been used for this project is from PIC series. PIC
microcontroller is the first RISC based microcontroller fabricated in CMOS
(complimentary metal oxide semiconductor) that uses separate bus for instruction and
data allowing simultaneous access of program and data memory.
The main advantage of CMOS and RISC combination is low power consumption
resulting in a very small chip size with a small pin count. The main advantage of CMOS
is that it has immunity to noise than other fabrication techniques.

Various microcontrollers offer different kinds of memories. EEPROM, EPROM,


FLASH etc. are some of the memories of which FLASH is the most recently developed.
Technology that is used in pic16F877 is flash technology, so that data is retained even
when the power is switched off. Easy Programming and Erasing are other features of
PIC 16F877.

CORE FEATURES:

• High-performance RISC CPU


• Only 35 single word instructions to learn
• All single cycle instructions except for program branches which are two cycle
• Operating speed: DC - 20 MHz clock input
DC - 200 ns instruction cycle
• Up to 8K x 14 words of Flash Program Memory,
Up to 368 x 8 bytes of Data Memory (RAM)
Up to 256 x 8 bytes of EEPROM data memory
• Pin out compatible to the PIC16C73/74/76/77
• Interrupt capability (up to 14 internal/external
• Eight level deep hardware stack
• Direct, indirect, and relative addressing modes
• Power-on Reset (POR)
• Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
• Watchdog Timer (WDT) with its own on-chip RC Oscillator for reliable operation
• Programmable code-protection
• Power saving SLEEP mode
• Selectable oscillator options
• Low-power, high-speed CMOS EPROM/EEPROM technology
• Fully static design
• In-Circuit Serial Programming (ICSP) via two pins
• Only single 5V source needed for programming capability
• In-Circuit Debugging via two pins
• Processor read/write access to program memory
• Wide operating voltage range: 2.5V to 5.5V
• High Sink/Source Current: 25 mA
• Commercial and Industrial temperature ranges
• Low-power consumption:

< 2mA typical @ 5V, 4 MHz


20mA typical @ 3V, 32 kHz
< 1mA typical standby current

PERIPHERAL FEATURES:

• Timer0: 8-bit timer/counter with 8-bit prescaler


• Timer1: 16-bit timer/counter with prescaler, can be incremented during sleep
Via external crystal/clock
• Timer2: 8-bit timer/counter with 8-bit period register, prescaler and postscaler

• Two Capture, Compare, PWM modules


Capture is 16-bit, max resolution is 12.5 ns,
Compare is 16-bit, max resolution is 200 ns,
PWM max. Resolution is 10-bit
• 10-bit multi-channel Analog-to-Digital converter
• Synchronous Serial Port (SSP) with SPI. (Master Mode) and I2C. (Master/Slave)
• Universal Synchronous Asynchronous Receiver Transmitter (USART/SCI) with
9- Bit addresses detection.
• Brown-out detection circuitry for Brown-out Reset (BOR)

ARCHITECTURE OF PIC 16F877:

The complete architecture of PIC 16F877 is shown in the fig 2.1. Table 2.1 gives
details about the specifications of PIC 16F877. Fig 2.2 shows the complete pin diagram
of the IC PIC 16F877.

TABLE SPECIFICATIONS

DATA DATA EEPROM


DEVICE PROGRAM FLASH
MEMORY
PIC
8K 368 Bytes 256 Bytes
16F877

PIN DIAGRAM OF PIC 16F877


PIN OUT DESCRIPTION
Legend: I = input O = output I/O = input/output P = power
= Not used TTL = TTL input ST = Schmitt Trigger input

Note :
1. This buffer is a Schmitt Trigger input when configured as an external interrupt.
2. This buffer is a Schmitt Trigger input when used in serial programming mode.
3. This buffer is a Schmitt Trigger input when configured as general purpose I/O and a
TTL input when used in the Parallel Slave Port mode (for interfacing to a
microprocessor bus).
4. This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a
CMOS input otherwise.

I/O PORTS:

Some pins for these I/O ports are multiplexed with an alternate function for the
peripheral features on the device. In general, when a peripheral is enabled, that pin may
not be used as a general purpose I/O pin.
Additional Information on I/O ports may be found in the IC micro™ Mid-Range
Reference Manual,

PORTA AND THE TRISA REGISTER:

PORTA is a 6-bit wide bi-directional port. The corresponding data direction register is
TRISA. Setting a TRISA bit (=1) will make the corresponding PORTA pin an input, i.e.,
put the corresponding output driver in a Hi-impedance mode. Clearing a TRISA bit (=0)
will make the corresponding PORTA pin an output, i.e., put the contents of the output
latch on the selected pin.

PORTB AND TRISB REGISTER:

PORTB is an 8-bit wide bi-directional port. The corresponding data direction


register is TRISB. Setting a TRISB bit (=1) will make the corresponding PORTB pin an
input, i.e., put the corresponding output driver in a hi-impedance mode. Clearing a
TRISB bit (=0) will make the corresponding PORTB pin an output, i.e., put the contents
of the output latch on the selected pin. Three pins of PORTB are multiplexed with the
Low Voltage Programming function; RB3/PGM, RB6/PGC and RB7/PGD. The alternate
functions of these pins are described in the Special Features Section. Each of the
PORTB pins has a weak internal pull-up. A single control bit can turn on all the pull-ups.
This is performed by clearing bit RBPU (OPTION_REG<7>). The weak pull-up is
automatically turned off when the port pin is configured as an output. The pull-ups are
disabled on a Power-on Reset.

PORTC AND THE TRISC REGISTER:

PORTC is an 8-bit wide bi-directional port. The corresponding data direction


register is TRISC. Setting a TRISC bit (=1) will make the corresponding PORTC pin an
input, i.e., put the corresponding output driver in a hi-impedance mode. Clearing a
TRISC bit (=0) will make the corresponding PORTC pin an output, i.e., put the contents
of the output latch on the selected pin. PORTC is multiplexed with several peripheral
functions. PORTC pins have Schmitt Trigger input buffers.

PORTD AND TRISD REGISTERS:

This section is not applicable to the 28-pin devices. PORTD is an 8-bit port with
Schmitt Trigger input buffers. Each pin is individually configurable as an input or output.
PORTD can be configured as an 8-bit wide microprocessor Port (parallel slave port) by
setting control bit PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.

PORTE AND TRISE REGISTER:

PORTE has three pins RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7, which are
individually configurable as inputs or outputs. These pins have Schmitt Trigger input
buffers.
The PORTE pins become control inputs for the microprocessor port when bit
PSPMODE (TRISE<4>) is set. In this mode, the user must make sure that the
TRISE<2:0> bits are set (pins are configured as digital inputs). Ensure ADCON1 is
configured for digital I/O. In this mode the input buffers are TTL.
PORTE pins are multiplexed with analog inputs. When selected as an analog
input, these pins will read as '0's. TRISE controls the direction of the RE pins, even
when they are being used as analog inputs. The user must make sure to keep the pins
configured as inputs when using them as analog inputs.

MEMORY ORGANISATION:

There are three memory blocks in each of the PIC16F877 MUC’s. The program
memory and Data Memory have separate buses so that concurrent access can occur.

PROGRAM MEMORY ORGANISATION:

The PIC16f877 devices have a 13-bit program counter capable of addressing 8K


*14 words of FLASH program memory. Accessing a location above the physically
implemented address will cause a wraparound.
The RESET vector is at 0000h and the interrupt vector is at 0004h.

DATA MEMORY ORGANISTION:

The data memory is partitioned into multiple banks which contain the General
Purpose Registers and the special functions Registers. Bits RP1 (STATUS<6) and RP0
(STATUS<5>) are the bank selected bits.

RP1:RP0 Banks
00 0
01 1
10 2
11 3

Each bank extends up to 7Fh (1238 bytes). The lower locations of each bank
are reserved for the Special Function Registers. Above the Special Function Registers
are General Purpose Registers, implemented as static RAM. All implemented banks
contain special function registers. Some frequently used special function registers from
one bank may be mirrored in another bank for code reduction and quicker access.

EEPROM:

EEPROM (electrically erasable, programmable read only memory) technology supplies


Nonvolatile storage of variables to a PIC-controlled device or instrument. That is
variables stored in an EEPROM will remain there even after power has been turned off
and then on again. Some instruments use an EEPROM to store calibration data during
manufacture. In this way, each instrument is actually custom built, with customization
that can be easily automated. Other instruments use and EEPROM to allow a user to
store several sets of setup information. For an instrument requiring a complicated
setup procedure, this permits a user to retrieve the setup required for any one of several
very
Different measurements. Still other devices use an EEPROM in a way that is
transparent
To a user, providing backup of setup parameters and thereby bridging over power
outages

The data EEPROM and flash program memory are readable and writable during
normal operation over the entire VDD range. A bulk erase operation may not be issued
from user code (which includes removing code protection. The data memory is not
directly mapped in the register file space. Instead it is indirectly addressed through the
special function registers (SFR).
There are six SFRS used to read and write the program and data EEPROM memory.
These registers are:

EECON1
EECON2
EEDATA
EEDATH
EEADR
EEADRH
EEDATA holds the 8-bit data for read/write and EEADRR holds the address of the
EEPROM location being accessed. The 8-bit EEADR register can access up to 256
locations of data EEPROM. The EEADR register can be thought of as the indirect
addressing register of the data EEPROM. EEcon1 contains the control bits, while
eecon2 is the register used to initiate the read/write. The EEPROM data memory allows
bytes read and write. A byte write automatically erases the location and writes the new
data. The write time is controlled by timer in-built.

TIMERS

There are three timers used Timer 0, Timer1 and Timer2

Timer 0

8-bit timer/counter
Software programmable prescaler
Internal or external clock select
Readable writable
Interrupt on overflow
Edge selects for external clock
Timer 1

Timer 1 can be used as timer or counter


It is 16-bit register
Software programmable prescaler
Interrupt on overflow
Readable and writable

The timer-1 module is a 16-bit timer/counter consisting two 8-bit register (TMR1H) and
TMR1L), which are readable and writable. The TMR1 register pair (TMR1H:TMR1L)
Increments from 0000h to FFFFH and rolls over to 0000h. The tmr1 interrupt, if enabled,
is generated on overflow, which is latched in interrupt flag bit tmr1IF. This interrupt can
be enabled/disabled by setting/clearing tmr1 interrupt enable bit tmr1IE.

Timer-2

Timer2 is an 8-bit timer with a prescaler and a postscaler. IT can be used as the PWM
Time-base for the PWM mode of the CCP module(s). The TMR2 register is readable
and writable, and is cleared on any device reset.
The input clock (Fosc/4) has a prescale option of 1:1, 1:4 OR 1:16, selected by
control bits.
The timer2 module has an 8-bit period register PR2. Timer2 increments from 00h
until it match PR2 and then resets to 00h on the next increment cycle. PR2 is a
readable and writable register. The PR2 register is initialized to FFh upon reset.
The match output of TMR2 goes through a 4-bit postscaler (which gives a 1:1 to 1:16
scaling inclusive) to generate a tmr2 interrupt
Timer 2 can be shut off by clearing control bit tmr2on to minimize power consumption.
The prescaler and postscaler counters are cleared when any of the following occurs:
A write to the tmr2 register
A write to the t2con register
An any device reset
Tmr2 is not cleared when t2con is written

ANALOG TO DIGITAL CONVERTER (ADC)

There are two types of analog to digital converter is present in this IC. We use
10-bit ADC. The ADC module can have up to eight analog inputs for a device. The
analog input charges a sample and hold capacitor. The output of sample and hold
capacitor is the input into the converter. The converter then generates a digital result of
this analog level via successive approximation. The A/D conversion of the analog input
signal results in a

Corresponding10-bit digital number. The A/D module has high and low voltage
reference input that is software selectable to some combination of VDD, VSS, and RA2
Or RA3.
The A/D module has four registers. These registers are

A/D result high register (ADRESH)


A/D RESULT LOW REGISTER (ADRESL)
A/D CONTROL REGISTER 0 (ADCON0)
A/D CONTROL REGISTER 1 (ADCON1)
INTERRUPTS

The PIC16F87X FAMILY HAS UPTO 14 SOURCES OF INTERRUPT. The interrupt


control register (INTCON) records individual interrupt requests in flag bits. IT also has
individual interrupt requests in flag bits. IT also has individual and global interrupt
enables bits.

Though some modules may generate multiple interrupts such as (USART) They have
14 sources. There is a minimum of one register used in the control and status of the
interrupts.
INTCON
Additionally if the device has peripheral interrupts, then it will have registers to
enable the peripheral interrupts and registers to hold the interrupt flag bits
PIE1
PIE2
PIR1
PIR2
ADDRESSING MODES:

DIRECT ADDRESSING:

In direct addressing, the operand specified by an 8-bit address field in the

instruction. Only internal data RAM and SFR’s can be directly addressed.

INDIRECT ADDRESSING:

In Indirect addressing, the instruction specifies a register that contains the

address of the operand. Both internal and external RAM can indirectly address.

The address register for 8-bit addresses can be either the Stack Pointer or R0 or

R1 of the selected register Bank. The address register for 16-bit addresses can be only

the 16-bit data pointer register, DPTR.

INDEXED ADDRESSING:

Program memory can only be accessed via indexed addressing this addressing

mode is intended for reading look-up tables in program memory. A 16 bit base register

(Either DPTR or the Program Counter) points to the base of the table, and the

accumulator is set up with the table entry number. Adding the Accumulator data to the

base pointer forms the address of the table entry in program memory.

Another type of indexed addressing is used in the“ case jump ” instructions. In

this case the destination address of a jump instruction is computed as the sum of the

base pointer and the Accumulator data.


REGISTER INSTRUCTION:

The register banks, which contains registers R0 through R7, can be accessed by

instructions whose opcodes carry a 3-bit register specification. Instructions that access

the registers this way make efficient use of code, since this mode eliminates an address

byte. When the instruction is executed, one of four banks is selected at execution time

by the row bank select bits in PSW.

REGISTER - SPECIFIC INSTRUCTION:

Some Instructions are specific to a certain register. For example some instruction

always operates on the Accumulator, so no address byte is needed to point OT ir. In

these cases, the opcode itself points to the correct register. Instruction that register to

Accumulator as A assemble as Accumulator - specific Opcodes.

IMMEDIATE CONSTANTS:

The value of a constant can follow the opcode in program memory For example.

MOV A, #100 loads the Accumulator with the decimal number 100. The same number

could be specified in hex digit as 64h.

OSCILLATOR AND CLOCK CIRCUIT:

XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier

which is intended for use as a crystal oscillator in the pioerce configuration, in the

frequency range of 1.2 MHz to 12 MHz. XTAL2 also the input to the internal clock

generator.
To drive the chip with an internal oscillator, one would ground XTAL1 and

XTAL2. Since the input to the clock generator is divide by two flip flop there are no

requirements on the duty cycle of the external oscillator signal. However, minimum high

and low times must be observed.

The clock generator divides the oscillator frequency by 2 and provides a tow

phase clock signal to the chip. The phase 1 signal is active during the first half to each

clock period and the phase 2 signals are active during the second half of each clock

period.

CPU TIMING:

A machine cycle consists of 6 states. Each stare is divided into a phase / half,

during which the phase 1 clock is active and phase 2 half. Arithmetic and Logical

operations take place during phase1 and internal register - to register transfer take

place during phase 2

TRENDS AND DEVELOPMENTS IN MICRO CONTROLLER

The manner in which the use of micro controllers is shaping our lives is
breathtaking. Today, this versatile device can be found in a variety of control
applications. CVTs, VCRs, CD players, microwave ovens, and automotive engine
systems are some of these.

A micro controller unit (MCU) uses the microprocessor as its central processing
unit (CPU) and incorporates memory, timing reference, I/O peripherals, etc on the same
chip. Limited computational capabilities and enhanced I/O are special features.
The micro controller is the most essential IC for continuous process- based applications
in industries like chemical, refinery, pharmaceutical automobile, steel, and electrical,
employing programmable logic systems (DCS). PLC and DCS thrive on the
programmability of an MCU.
There are many MCU manufacturers. To understand and apply general
concepts, it is necessary to study one type in detail. This specific knowledge can be
used to understand similar features of other MCUs.
Micro controller devices have many similarities. When you look at the differences, they
are not so great either. Most common and popular MCUs are considered to be mature
and well-established products, which have their individual adherents and devotees.
There are a number of variants within each family to satisfy most memory, I/O, data
conversion, and timing needs of end-user applications.

`The MCU is designed to operate on application-oriented sensor data-for


example, temperature and pressure of a blast furnace in an industrial process that is fed
through its serial or operated on under the control of software and stored in ROM.
Appropriate signals are fed via output ports to control external devices and systems.
APPLICATIONS OF MICROCONTROLLERS

Microcontrollers are designed for use in sophisticated real time applications such

as

1. Industrial Control

2. Instrumentation and

3. Intelligent computer peripherals

They are used in industrial applications to control

 Motor

 Robotics

 Discrete and continuous process control

 In missile guidance and control

 In medical instrumentation

 Oscilloscopes

 Telecommunication

 Automobiles

 For Scanning a keyboard

 Driving an LCD

 For Frequency measurements

 Period Measurements
4.2 LIQUID CRYSTAL DISPLAY (LCD)

Liquid crystal displays (LCD’s) have materials, which combine the properties of
both liquids and crystals. Rather than having a melting point, they have a temperature
range within which the molecules are almost as mobile as they would be in a liquid, but
are grouped together in an ordered form similar to a crystal.

An LCD consists of two glass panels, with the liquid crystal material sand witched
in between them. The inner surface of the glass plates are coated with transparent
electrodes which define the character, symbols or patterns to be displayed polymeric
layers are present in between the electrodes and the liquid crystal, which makes the
liquid crystal molecules to maintain a defined orientation angle.

One each polarizes are pasted outside the two glass panels. These polarizes
would rotate the light rays passing through them to a definite angle, in a particular
direction. When the LCD is in the off state, light rays are rotated by the two polarizes
and the liquid crystal, such that the light rays come out of the LCD without any
orientation, and hence the LCD appears transparent.

When sufficient voltage is applied to the electrodes, the liquid crystal molecules
would be aligned in a specific direction. The light rays passing through the LCD would
be rotated by the polarizes, which would result in activating / highlighting the desired
characters. The LCD’s are lightweight with only a few millimeters thickness. Since the
LCD’s consume less power, they are compatible with low power electronic circuits, and
can be powered for long durations.

The LCD does not generate light and so light is needed to read the display. By
using backlighting, reading is possible in the dark. The LCD’s have long life and a wide
operating temperature range. Changing the display size or the layout size is relatively
simple which makes the LCD’s more customers friendly.

The LCDs used exclusively in watches, calculators and measuring instruments


are the simple seven-segment displays, having a limited amount of numeric data. The
recent advances in technology have resulted in better legibility, more information
displaying capability and a wider temperature range. These have resulted in the LCDs
being extensively used in telecommunications and entertainment electronics. The LCDs
have even started replacing the cathode ray tubes (CRTs) used for the display of text
and graphics, and also in small TV applications.

Crystalonics dot–matrix (alphanumeric) liquid crystal displays are available in


TN, STN types, with or without backlight. The use of C-MOS LCD controller and driver
ICs result in low power consumption. These modules can be interfaced with a 4-bit or 8-
bit microprocessor /Micro controller.

 The built-in controller IC has the following features:


 Correspond to high speed MPU interface (2MHz)
 80 x 8 bit display RAM (80 Characters max)
 9,920-bit character generator ROM for a total of 240 character fonts. 208 character
fonts (5 x 8 dots) 32 character fonts (5 x 10 dots)
 64 x 8 bit character generator RAM 8 character generator RAM 8 character fonts (5
x 8 dots) 4 characters fonts (5 x 10 dots)
 Programmable duty cycles
 1/8 – for one line of 5 x 8 dots with cursor
 1/11 – for one line of 5 x 10 dots with cursor
 1/16 – for one line of 5 x 8 dots with cursor
 Wide range of instruction functions display clear, cursor home, display on/off, cursor
on/off, display character blink, cursor shift, display shift.
 Automatic reset circuit, which initializes the controller / driver ICs after power on.
4.3 TEMPERATURE SENSOR

A Thermistor is a type of resistor used to measure temperature changes, relying


on the change in its resistance with changing temperature. Thermistor is a combination
of the words thermal and resistor.

In this circuit the thermister is used to measure the temperature. Thermister is


nothing but temperature sensitive resistor. There are two type of thermister available
such as positive temperature co-efficient and negative temperature co- efficient. Here
we are using negative temperature co-efficient in which the resistance value is
decreased when the temperature is increased.\
5. OVERALL CIRCUIT DIAGRAM
6. OVERALL CIRCUIT DIAGRAM DESCRIPTION

6.1 POWER SUPPLY DESCRIPTION

Block diagram

The ac voltage, typically 220V rms, is connected to a transformer, which steps


that ac voltage down to the level of the desired dc output. A diode rectifier then provides
a full-wave rectified voltage that is initially filtered by a simple capacitor filter to produce
a dc voltage. This resulting dc voltage usually has some ripple or ac voltage variation.
A regulator circuit removes the ripples and also remains the same dc value even
if the input dc voltage varies, or the load connected to the output dc voltage changes.
This voltage regulation is usually obtained using one of the popular voltage regulator IC
units.

TRANSFORMER RECTIFIER FILTER IC REGULATOR LOAD

Block diagram (Power supply)


Working principle

Transformer

The transformer will step down the power supply voltage (0-230V) to (0-6V) level. Then
the secondary of the potential transformer will be connected to the precision rectifier,
which is constructed with the help of op–amp. The advantages of using precision
rectifier are it will give peak voltage output as DC; rest of the circuits will give only RMS
output.

Bridge rectifier

When four diodes are connected as shown in figure, the circuit is called as bridge
rectifier. The input to the circuit is applied to the diagonally opposite corners of the
network, and the output is taken from the remaining two corners.

Let us assume that the transformer is working properly and there is a positive
potential, at point A and a negative potential at point B. the positive potential at point A
will forward bias D3 and reverse bias D4.

The negative potential at point B will forward bias D1 and reverse D2. At this time
D3 and D1 are forward biased and will allow current flow to pass through them; D4 and
D2 are reverse biased and will block current flow.

The path for current flow is from point B through D1, up through RL, through D3,
through the secondary of the transformer back to point B. this path is indicated by the
solid arrows. Waveforms (1) and (2) can be observed across D1 and D3.
One-half cycle later the polarity across the secondary of the transformer reverse,
forward biasing D2 and D4 and reverse biasing D1 and D3. Current flow will now be
from

point A through D4, up through RL, through D2, through the secondary of T1, and back
to point A. This path is indicated by the broken arrows. Waveforms (3) and (4) can be
observed across D2 and D4. The current flow through RL is always in the same
direction. In flowing through RL this current develops a voltage corresponding to that
shown waveform (5). Since current flows through the load (RL) during both half cycles
of the applied voltage, this bridge rectifier is a full-wave rectifier.

One advantage of a bridge rectifier over a conventional full-wave rectifier is that


with a given transformer the bridge rectifier produces a voltage output that is nearly
twice that of the conventional full-wave circuit.

This may be shown by assigning values to some of the components shown in


views A and B. assume that the same transformer is used in both circuits. The peak
voltage developed between points X and y is 1000 volts in both circuits. In the
conventional full-wave circuit shown—in view A, the peak voltage from the center tap to
either X or Y is 500 volts. Since only one diode can conduct at any instant, the
maximum voltage that can be rectified at any instant is 500 volts.

The maximum voltage that appears across the load resistor is nearly-but never
exceeds-500 v0lts, as result of the small voltage drop across the diode. In the bridge
rectifier shown in view B, the maximum voltage that can be rectified is the full secondary
voltage, which is 1000 volts. Therefore, the peak output voltage across the load resistor
is nearly 1000 volts. With both circuits using the same transformer, the bridge rectifier
circuit produces a higher output voltage than the conventional full-wave rectifier circuit.
IC voltage regulators

Voltage regulators comprise a class of widely used ICs. Regulator IC units


contain the circuitry for reference source, comparator amplifier, control device, and
overload protection all in a single IC. IC units provide regulation of either a fixed positive
voltage, a fixed negative voltage, or an adjustably set voltage. The regulators can be
selected for operation with load currents from hundreds of milli amperes to tens of
amperes, corresponding to power ratings from milli watts to tens of watts.

Circuit diagram (Power supply)

A fixed three-terminal voltage regulator has an unregulated dc input voltage, Vi,


applied to one input terminal, a regulated dc output voltage, Vo, from a second terminal,
with the third terminal connected to ground.
The series 78 regulators provide fixed positive regulated voltages from 5 to 24
volts. Similarly, the series 79 regulators provide fixed negative regulated voltages from 5
to 24 volts.
 For ICs, microcontroller, LCD --------- 5 volts
 For alarm circuit, op-amp, relay circuits ---------- 12 volts
6.2 MICROCONTROLLER CIRCUIT

The microcontroller circuit is connected with reset circuit, crystal oscillator circuit,
lcd circuit the reset circuit is the one which is an external interrupt which is designed to
reset the program. And the crystal oscillator circuit is the one used to generate the
pulses to microcontroller and it also called as the heart of the microcontroller here we
have used 4mhz crystal which generates pulses upto 12000000 frequency which is
converted it machine cycle frequency when divided by 12 which is equal to 1000000hz
to find the time we have to invert the frequency so that we get one micro second for
each execution of the instruction.

The lcd that is liquid crystal display which is used to display the what we need the
lcd has fourteen pins in which three pins for the command and eight pins for the data. If
the data is given to lcd it is write command which is configured by the programmer
otherwise it is read command in which data read to microcontroller the data pins are
given to the to Ported and command pins are given to the Port.
Other than these pin a one pin configured for the contrast of the lcd. Thus the
microcontroller circuit works
6.3 TEMPERATURE SENSOR

A thermistor is a type of resistor used to measure temperature changes, relying


on the change in its resistance with changing temperature. Thermistor is a combination
of the words thermal and resistor.
In this circuit the thermister is used to measure the temperature. Thermister is
nothing but temperature sensitive resistor. There are two type of thermister available
such as positive temperature co-efficient and negative temperature co- efficient. Here
we are using negative temperature co-efficient in which the resistance value is
decreased when the temperature is increased.

Here the thermister is connected with resister bridge network. The bridge
terminals are connected to inverting and non-inverting input terminals of comparator.
The comparator is constructed by LM 324 operational amplifier.

The LM 324 consist of four independent, high gains, internally frequency


compensated operational amplifier which were designed specifically to operate from a
single power supply over a wide voltage range.

The first stage is a comparator in which the variable voltage due to thermister is
given to inverting input terminal and reference voltage is given to non-inverting input
terminal.
Initially the reference voltage is set to room temperature level so the output of the
comparator is zero.

When the temperature is increased above the room temperature level, the
thermister resistance is decreased so variable voltage is given to comparator. Now the
comparator delivered the error voltage at the output. Then the error voltage is given to
next stage of preamplifier.
Here the input error voltage is amplified then the amplified voltage is given to
next stage of gain amplifier. In this amplifier the variable resistor is connected as
feedback resistor. The feedback resistor is adjusted to get desired gain. Then the AC
components in the output are filtered with the help of capacitors. Then output voltage is
given to final stage of DC voltage follower through this the output voltage is given to
ADC or other circuit.

6.4 PRESSURE SENSOR:


PRESSURE MONITOR

Pressure:
Pressure (symbol: p) is the force per unit area applied on a surface in a direction
perpendicular to that surface. Mathematically:

where:
p is the pressure
F is the normal force
A is the area.
Pressure is a scalar, and has SI units of pascals, 1 Pa = 1 N/m2.
Pressure is transmitted to solid boundaries or across arbitrary sections of fluid normal to
these boundaries or sections at every point. It is a fundamental parameter in thermodynamics and
it is conjugate to volume.

Circuit description:
This circuit is designed to measure the varying pressure. The pressure is measured
by diaphragm which is one type of transducer. When pressure is applied, the diaphragm is
moving in the forward side. The diaphragm moving is depends on the pressure. So it generates
the voltage pulse depends on the movement of diaphragm. The voltage pulses are in the range of
milli voltage. Hence the voltage pulse is given to Instrumentation amplifier section in order to
amplify the signals.
The important features of instrumentation amplifier are high gain accuracy, high
CMRR, low output impedance. Here the instrumentation amplifier is constructed by
TL 082 operational amplifier. The TL 082 is the dual operational amplifier that is two
operational amplifiers is fabricated in single chip. Here the instrumentation amplifier acts as
differential instrumentation amplifier. The diaphragm transducer terminals are connected to A1
and A2 amplifier of the differential instrumentation amplifier.
The difference of the varying voltage signals from the transducer is amplified by the
instrumentation amplifier. The A4 amplifier is used for zero adjustment. When there is no
pressure the diaphragm may be sliding in the forward or reverse side. Due to that instrumentation
amplifier delivered some voltage at the output. To avoid this problem A4 amplifier is used for
zero adjustment. Hence when there is no pressure the output is zero.
The A5 amplifier acts as gain amplifier in which variable resistors is connected as feedback
resistor. By adjusting the feedback resistor we can vary the gain of the output signal. Then the
final gain adjusted signal is amplified by the A6 amplifier.

6.5 FLOAT SENSOR LEVEL MEASUREMENT USING FLOAT

Float is the one type of transducer which is used to measure the water level in the tank.
Circuit description:
The float changes the resistance value depending on the water level. This change is
resistance is converted into corresponding voltage signal which is given to inverting input
terminal of the comparator. The reference voltage is given to non inverting input terminal.
The comparator is constructed by the operational amplifier LM 741. The comparator
compares with reference water level and delivered the error voltage at the output terminal. Then
the error voltage is given to next stage of gain amplifier which is constructed by another
operational amplifier LM 741. In the gain amplifier the variable resistor is connected in the
feedback path, by adjusting the resistor we can get the deesired gain. Then the final voltage is
given to ADC for convert the analog siganl to digital signal. Then the corresponding digital
signal is given to microcontroller in order to find the water level in the tank.
6.6 SPEED PROXIMITY SENSOR SPEED MEASUREMENT USING PROXIMITY

Proximity sensor:

Inductive proximity sensors are widely used in various applications to detect metal
devices. They can be used in various environments (industry, workshop, lift shaft...) and need
high reliability. 

Inductive proximity sensors generate an electromagnetic field and detect the eddy current
losses induced when the metal target enters the field. The field is generated by a coil, wrapped
round a ferrite core, which is used by a transistorized circuit to produce oscillations. The target,
while entering the electromagnetic field produced by the coil, will decrease the oscillations due
to eddy currents developed in the target. If the target approaches the sensor within the so-called
"sensing range", the oscillations cannot be produced anymore: the detector circuit generates then
an output signal controlling a relay or a switch. 
Circuit description:
The wheel type metal rod is fixed in the motor shaft. The proximity sensor is placed near
the shaft. When the shaft is rotating, the metal rod is crossed the proximity sensors sequentially.
So the sensor gives the pulse to the microcontroller. Now the microcontroller counts the pulse.
By using this pulse count we can find revolution per minute which is equal to speed of the
microcontroller.

7. PCB DESIGN

Design and Fabrication of Printed circuit boards

7.1 INTRODUCTION:

Printed circuit boards, or PCBs, form the core of electronic equipment domestic
and industrial. Some of the areas where PCBs are intensively used are computers,
process control, telecommunications and instrumentation.

7.2 MANUFATCURING:

The manufacturing process consists of two methods; print and etch, and print,
plate and etch. The single sided PCBs are usually made using the print and etch
method. The double sided plate through – hole (PTH) boards are made by the print
plate and etch method.

The production of multi layer boards uses both the methods. The inner layers are
printed and etch while the outer layers are produced by print, plate and etch after
pressing the inner layers.
7.3 SOFTWARE:

The software used in our project to obtain the schematic layout is MICROSIM.

7.4 PANELISATION:

Here the schematic transformed in to the working positive/negative films. The


circuit is repeated conveniently to accommodate economically as many circuits as
possible in a panel, which can be operated in every sequence of subsequent steps in
the PCB process. This is called penalization. For the PTH boards, the next operation is
drilling.

7.5 DRILLING:

PCB drilling is a state of the art operation. Very small holes are drilled with high
speed CNC drilling machines, giving a wall finish with less or no smear or epoxy,
required for void free through hole plating.

7.6 PLATING:

The heart of the PCB manufacturing process. The holes drilled in the board are
treated both mechanically and chemically before depositing the copper by the electro
less copper platting process.

7.7 ETCHING:

Once a multiplayer board is drilled and electro less copper deposited, the image
available in the form of a film is transferred on to the out side by photo printing using a
dry film printing process. The boards are then electrolytic plated on to the circuit pattern
with copper and tin. The tin-plated deposit serves an etch resist when copper in the
unwanted area is removed by the conveyor’s spray etching machines with chemical
etch ants. The etching machines are attached to an automatic dosing equipment, which
analyses and controls etch ants concentrations

7.8 SOLDERMASK:

Since a PCB design may call for very close spacing between conductors, a
solder mask has to be applied on the both sides of the circuitry to avoid the bridging of
conductors. The solder mask ink is applied by screening. The ink is dried, exposed to
UV, developed in a mild alkaline solution and finally cured by both UV and thermal
energy.

HOT AIR LEVELLING:

After applying the solder mask, the circuit pads are soldered using the hot air
leveling process. The bare bodies fluxed and dipped in to a molten solder bath. While
removing the board from the solder bath, hot air is blown on both sides of the board
through air knives in the machines, leaving the board soldered and leveled. This is one
of the common finishes given to the boards. Thus the double sided plated through
whole printed circuit board is manufactured and is now ready for the components to be
soldered.
8 SOFTWARE TOOLS

8.1 MPLAB

MPLAB IDE is an integrated development environment that provides


development engineers with the flexibility to develop and debug firmware for various
Microchip devices

MPLAB IDE is a Windows-based Integrated Development Environment for the


Microchip Technology Incorporated PICmicrocontroller (MCU) and dsPIC digital signal
controller (DSC) families. In the MPLAB IDE, you can:

 Create source code using the built-in editor.


 Assemble, compile and link source code using various language tools. An
assembler, linker and librarian come with MPLAB IDE. C compilers are available
from Microchip and other third party vendors.

 Debug the executable logic by watching program flow with a simulator, such as
MPLAB SIM, or in real time with an emulator, such as MPLAB ICE. Third party
emulators that work with MPLAB IDE are also available.

 Make timing measurements.

 View variables in Watch windows.

 Program firmware into devices with programmers such as PICSTART Plus or


PRO MATE II.

 Find quick answers to questions from the MPLAB IDE on-line Help.
8.2 MPLAB SIMULATOR

MPLAB SIM is a discrete-event simulator for the PIC microcontroller (MCU) families.  It
is integrated into MPLAB IDE integrated development environment. The MPLAB SIM
debugging tool is designed to model operation of Microchip Technology's PIC
microcontrollers to assist users in debugging software for these devices

8.3 IC PROG

The PRO MATE II is a Microchip microcontroller device programmer. Through


interchangeable programming socket modules, PRO MATE II enables you to quickly
and easily program the entire line of Microchip PICmicro microcontroller devices and
many of the Microchip memory parts.

PRO MATE II may be used with MPLAB IDE running under supported Windows OS's
(see Read me for PRO MATE II.txt for support list), with the command-line controller
PROCMD or as a stand-alone programmer

8.4 COMPILER-HIGH TECH C

A program written in the high level language called C; which will be converted into
PICmicro MCU machine code by a compiler. Machine code is suitable for use by a
PICmicro MCU or Microchip development system product like MPLAB IDE.
8.5 PIC START PLUS PROGRAMMER:

The PIC start plus development system from microchip technology provides
the product development engineer with a highly flexible low cost microcontroller design
tool set for all microchip PIC micro devices. The pic start plus development system
includes PIC start plus development programmer and MPLAB IDE.

The PIC start plus programmer gives the product developer ability to program
user software in to any of the supported microcontrollers. The PIC start plus software
running under MPLAB provides for full interactive control over the programmer.

9. PROGRAM:

#include <AT89X52.H>
pdata unsigned char ch0 _at_ 0x08;
pdata unsigned char ch1 _at_ 0x09;
pdata unsigned char ch2 _at_ 0x0a;
pdata unsigned char ch3 _at_ 0x0b;

pdata unsigned char soc _at_ 0x10;


pdata unsigned char porta _at_ 0x18;
pdata unsigned char portc _at_ 0x20;

void delay(unsigned int);


void read(unsigned char);
void write(unsigned char);
void lcd_dis(unsigned char *dis,unsigned char rr);
void lcd_init(void);
void ext_init();

unsigned int temp,fuel,spd,d1,dist,mil;


unsigned char count,s,f1;
float dia=10,d;

bit a,b;

void adc1();
void tmr_init();

sbit alarm=P2^0;

unsigned char temp1,k,i;


unsigned int a1;
void hex_dec_fuel(unsigned char);
void hex_dec1(unsigned int);

void tmer0(void) interrupt 1


{
TR0=0;
i++;
if(i>100)
{
i=0;
s=spd;
d=spd=(spd*36);
//spd=(spd/30)*60;
dist = dist + (d/30);
read(0x82);
hex_dec1(spd);
if(spd>300) alarm=1;
else alarm=0;
read(0x8a);
hex_dec1(dist);
if(f1<fuel) a=0;
else if((f1-fuel)>=10)
{
mil = dist - d1;
d1=dist;
f1=fuel;
a=1;
}
if(a==0) {f1 = fuel; a=1;}

read(0xca);
hex_dec1(mil);
write(' ');
write(' ');
count=spd=0;
}
TR0=1;
TMOD=0x01;
TH0=0xd8;
TL0=0xf0;
}

void ex_int(void)interrupt 0
{
spd++;
}

void main()
{
alarm=0;
lcd_init();
read(0x80);
lcd_dis("MILAGE PROJECTOR",16);
read(0xc0);
lcd_dis(" AND FUEL LEVEL ",16);
delay(65000);delay(65000);

read(0x80);
lcd_dis("S:0000 D:0000 ",16);
read(0xc0);
lcd_dis("F:00.0 M:0000 ",16);
tmr_init();
ext_init();
TR0=1;

while(1)
{
adc1();
read(0xc2);
fuel = temp1;
hex_dec_fuel(fuel);

}//while
} //main

void lcd_init()
{

10.ADVANTAGES

 Easy Implementation
 Low cost
 Can know and maintain the driver and car performance
10. APPLICATIONS

This project is very useful in automobiles.


11. CONCLUSION

The progress in science & technology is a non-stop process. New things and
new technology are being invented. As the technology grows day by day, we can
imagine about the future in which thing we may occupy every place.

The proposed system based on PIC microcontroller[micro chip] is found to be more


compact, user friendly and less complex, which can readily be used in order to perform.
Several tedious and repetitive tasks. Though it is designed keeping in mind about the
need for industry, it can extended for other purposes such as commercial & research
applications. Due to the probability of high technology (PIC microcontroller) used this

“VEHICLE PERFORMANCE ANALYSER


” system is fully software controlled with less hardware circuit. The feature makes
this system is the base for future systems.
13. REFERENCES

MILL MAN J and HAWKIES C.C. “INTEGRATED


ELECTRONICS” MCGRAW HILL, 1972

ROY CHOUDHURY D, SHAIL JAIN, “ LINEAR INTEGRATED


CIRCUIT”, New Age International Publishers, New Delhi,2000

“DESIGN WITH PIC MICROCONTROLLER” by John Bheat Man.

WEBSITES:

http://www.microchip.com/

www.8052.com

http://www.beyondlogic.org

http://www.ctv.es/pckits/home.html

http://www.aimglobal.org/

You might also like