PIC Micro Controllers PIC16F84 (2)

14
PIC Microcontrollers PIC16F84

description

my study on pic micro controller begin with this chip

Transcript of PIC Micro Controllers PIC16F84 (2)

Page 1: PIC Micro Controllers PIC16F84 (2)

PIC Microcontrollers

PIC16F84

Page 2: PIC Micro Controllers PIC16F84 (2)

• The PIC was originally designed as a Peripheral Interface Controller (PIC) for a 16-bit microprocessor.

• It was essentially an I/O controller and was designed to be very fast.

• The PIC16F84 (or PIC16F84A) microcontroller is unique because its program memory is made using Flash technology.

• It can be programmed, tested in-circuit and reprogrammed if necessary

Page 3: PIC Micro Controllers PIC16F84 (2)

PIC16F84 belongs to a class of 8-bit microcontrollers of RISC architecture.

Program memory (FLASH)- for storing a written programEEPROM - data memory that needs to be saved when there is no supply.RAM - data memory used by a program during its execution.CENTRAL PROCESSING UNIT has a role of connective element between other blocks in themicrocontroller.

Page 4: PIC Micro Controllers PIC16F84 (2)

RISC & CISC• Microcontrollers with Harvard architecture

are also called "RISC microcontrollers". • RISC stands for Reduced Instruction Set

Computer.

• Microcontrollers with von-Neumann's architecture are called 'CISC microcontrollers'.

• Title CISC stands for Complex Instruction Set Computer.

Page 5: PIC Micro Controllers PIC16F84 (2)

• Since PIC16F84 is a RISC microcontroller, that means that it has a reduced set of instructions, more precisely 35 instructions . (ex. Intel's and Motorola's microcontrollers have over hundredinstructions)

• PIC16F84 usually reaches results of 2:1 in code compression and 4:1 in speed in relation to other 8-bit microcontrollers in its class.

Page 6: PIC Micro Controllers PIC16F84 (2)

PIC16F84 perfectly fits many uses, from automotive industries and controlling home appliances to industrial instruments, remote sensors, electrical door locks and safety devices.

Low cost, low consumption, easy handling and flexibility make PIC16F84 applicable even in areas where microcontrollers had not previously been considered (example: timer functions, interface replacement in larger systems, coprocessor applications, etc.).

Applications

Page 7: PIC Micro Controllers PIC16F84 (2)

It is also ideal for smart cards as well as for battery supplied devices because of its low consumption.

PIC16F84 also used at pedestrian crossing system in which the traffic signal change when the button is pressed.

This circuit mostly always used a timer to set the time. Need to program the IC first before connect.

Clock is microcontroller's main starter, and is obtained from an external component called an "oscillator".

Page 8: PIC Micro Controllers PIC16F84 (2)

Clock

• Clock from the oscillator enters a microcontroller via OSC1 pin where internal circuit of a microcontroller divides the clock into four even clocks Q1, Q2, Q3, and Q4 which do not overlap.

• These four clocks make up one instruction cycle

Page 9: PIC Micro Controllers PIC16F84 (2)

CLOCK OSCILLATOR

Four different types of clock oscillators may be used with PICI6F84 parts in general. The clock oscillator types are:

• RC -resistor/capacitor.• XT -crystal or ceramic resonator -external clock.• HS -high speed crystal or ceramic resonator -

external clock.• LP -low power crystal –external clock.

Page 10: PIC Micro Controllers PIC16F84 (2)

Pin Description

PIC16F84 has a total of 18 pins.

It is most frequently found in a DIP18 type case but can also be found in SMD (Surface Mount Devices) case which is smaller from a DIP (Dual In Package.).

DIP & SMD suggesting that holes for pins to go through when mounting, didn't need to soldering this type of a component.

Page 11: PIC Micro Controllers PIC16F84 (2)

Pin no.1 - RA2 Second pin on port A. Has no additional functionPin no.2 - RA3 Third pin on port A. Has no additional function.Pin no.3 - RA4 Fourth pin on port A. TOCK1 which functions as a timerPin no.4 - MCLR Reset input and Vpp programming voltage of a microcontrollerPin no.5 - Vss Ground of power supply.Pin no.6 - RB0 Zero pin on port B. Interrupt input is an additional function.Pin no.7 - RB1 First pin on port B. No additional function.Pin no.8 - RB2 Second pin on port B. No additional function.Pin no.9 - RB3 Third pin on port B. No additional function.

Pin no.10 RB4 Fourth pin on port B. No additional function.Pin no.11 RB5 Fifth pin on port B. No additional function.Pin no.12 RB6 Sixth pin on port B. 'Clock' line in program mode.Pin no.13 RB7 Seventh pin on port B. 'Data' line in program mode.Pin no.14 Vdd Positive power supply pole.Pin no.15 OSC2 Pin assigned for connecting with an oscillatorPin no.16 OSC1 Pin assigned for connecting with an oscillatorPin no.17 RA2 Second pin on port A. No additional functionPin no.18 RA1 First pin on port A. No additional function.

Page 12: PIC Micro Controllers PIC16F84 (2)

RESET

The PICl6F84 has built-in power-on reset which works as long as the power supply voltage comes up quickly.

Commonly the MCLR pin is tied to the power supply. A switch may be used to regain control if things run away.

Page 13: PIC Micro Controllers PIC16F84 (2)

PIC16F84 Block

Diagram

Page 14: PIC Micro Controllers PIC16F84 (2)

FINISH