Você está na página 1de 11

PIC16F877

MICRO-CONTROLLER PROJECT ON: A PIC CONTROLLED

WEATHER METER

CREDITS: FRANK DONALD (Network engineer, tata communications)


PRESENTED ON THIS DAY:13TH JANUARY 2016
BY:
ILUOBE EMMANUEL ODIANOSEN
AHID TAHIR BADAMASI
AHMED BASHIR
KAMAL ABDALLAH
NIGERIAN TURKISH NILE UNIVERSITY, ABUJA
electrical/electronic engineering

INTRODUCTION

What are Micro controllers

They are compact standalone computers, optimized for control (dedicated) applications.
Having its entire processor, memory and the I/O interfaces located on a single piece of
silicon chip, this lessens the time needed to read and write to external devices

Why PIC16F877 Micro controller

The PIC16F877 Micro controller is one of the most popular 8bit microcontroller ever
produced and its often used in the Automotive Industries, Appliances and Consumer
applications.

CERTAIN KEY FEATURES OF THE


PIC16F877
High performance RISC CPU
Only 35 single word instructions to learn
Operating speed: DC - 20 MHz clock input

DC - 200 ns instruction cycle (single per cycle)


Up to 8K x 14 words of FLASH Program Memory
Low-power consumption:
- < 0.6 mA typical @ 3V, 4 MHz
- 20 A typical @ 3V, 32 kHz
-< 1 A typical standby current
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
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 PIC16C73B/74B/76/77
Interrupt capability (up to 14 sources)
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)

Block diagram representation of the

WEATHER METER
Weather

monitoring systems are instruments/equipment used for measuring

atmospheric conditions to provide information for weather forecasting, climate study


and many other purposes. Most of these kind of instruments might be bulky,
expensive and not customizable for our specific needs. To overcome these challenges
a customized weather meter can be built using a PIC microcontroller which wont
cost much, The PIC16F877 is used in this project to construct a WEATHER METER

A Weather Meter
Australia

Mildura Airport Weather Station,

DESIGNING THE WEATHER


METER
OVERVIEW

The system is built around the PIC

microcontroller where three parameters are

measured in this system;


Humidity,
Temperature and
Light intensity; these are the parameters the system takes as input to understand
the weather condition. Then these parameters are displayed (Outputted) in the LCD
screen for the user

TEMPERATURE SENSOR
An LM35 Temperature Sensor is used in this project to collect temperature data. It is
capable of sensing temperatures ranging from -55C to 150C, The output voltage
will be proportional to the temperature hence there is no need of trimmers. The
output voltage of this sensor varies by 10mv per degree change in temperature.

DESIGNING THE WEATHER


METER
HUMIDITY SENSOR
This obtains the output voltage of the humidity parameter as earlier discussed and it
is scaled to a percentage value and the reading is then shown as a percentage on the
display screen LCD (LM016L).

LIGHT SENSOR
This component (LDR) would measure how much light is shining on it (Intensity), The
Simple LDR is used along with a resistor to form a voltage divider and the output is
obtained from that divider. This output is also scaled as percentages and displayed
on the LCD Screen for the User.

PROGRAMMING THE
CONTROLLER (ALGORITHM/CODE)

Initialize the LCD display.


Display H , L and T which
represents
the
parameters
Humidity, Light intensity and
Temperature.
Define
various
weather
conditions such as Sunny,
rainy, Windy, harmattan, dry
etc. for the expected sensor
readings.
Initialize the ADC Channels for
the respective sensors.
Read the sensor output one by
one.
Make appropriate conversion of
the ADC value.
Display the sensor values in the
LCD display for the user.

PROGRAMMING THE
CONTROLLER (ALGORITHM/CODE)

PROJECTS SCHEMATICS

CONCLUSION

The working principle of the controller involves the use of 14 out of 40 PDIP (Plastic
Dual in Line Pins)

CSCS Compiler used for compilation

Code written in C Language

The Micro controller uses 2 sets of CCP (Compare & Contrast) comprised of 16 bit
Registers and split into two sets of 8 bits.
ADC serves as an Analog to Digital Converter

The Following Pins of the Microcontroller were used to connect the LCD Display
(LM016L ), Light Sensor, Humidity Sensor and the Temperature Sensor (LM35) to the
Micro-controller PIn1 Master Clear Input , Pin2 - RA0/AN0 Port A [General Purpose
I/O Ports & Analog Digital Converters], Pin3 - RA1/AN1 Port A [General Purpose I/O
Ports & Analog Digital Converters], Pin4 RA2/AN2 Port A [A/D negative Voltage
Reference], Pin8 RE0/RD/AN5 Port E [General Purpose I/O], Pin9 RE1/WR/AN6
Port E [General Purpose I/O], Pin19 RD0/PSP0/ Port D, Pin20 RD1/PSP1/ Port D,
Pin21 RD2/PSP2/ Port D, Pin22 RD3/PSP3/ Port D, Pin27 RD4/PSP4/ Port D,
Pin28 RD5/PSP5/ Port D, Pin29 RD6/PSP6/ Port D, Pin30 RD7/PSP7/ Port D
19-30[ General Purpose I/O Ports]
Micro controllers are applied in dedicated applications because of; speed, easy debug
factor, size, cost etc.

10

THE END
THANK YOU.

11

Você também pode gostar