Sei sulla pagina 1di 8

MICROCONTROLLER

Microcontroller is a general purpose device, which integrates a number of the components of a microprocessor system on to single chip. It ha inbuilt CPU, memory and peripherals to make it work as a minicomputer a microcontroller combines on to the same microchip. The CPU core Memory(both ROM and RAM) Some parallel digital I/O Microcontroller will combine other devices such as A timer module to allow the microcontroller to perform tasks for certain time periods. A serial I/O port to allow data to allow between the controller and other devices such as a PIC or another microcontroller An ADC to allow the microcontroller to accept analog input data for processing. Micro controller is a stand-alone unit, which can perform functions on its own without any requirement for additional hardware like I/O port and external memory. The heart of the microcontroller is the CPU core. In the past, this has traditionally been based on a 8-bit microcontroller unit. For example Motorola uses a basic 6800 microprocessor core in their 6805/6808 microcontroller devices. Introduction to 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 (Complementary 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 PISC 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.

PIC (16F877)
Various microcontroller offer different kinds of memories. EEPROM, EPROM, FLASH are some of the memories of which FLASH is the most recentally developed. The technology that is used in PIC 16F877 is a flash technology, so that data is retained even when the power is switched off. Easy programming and erasing are other features of PIC 16F877. SPECIAL FEATURES OF PIC MICROCONTROLLER 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 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) 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 FLASH/EEPROM technology In-Circuit Serial Programming (ICSP) via two pins Single 5V In-Circuit Serial Programming capability Processor read/write access to program memory Wide operating voltage range: 2.0V to 5.5V

ARCHITECTURE OF PIC 16F877


The complete architecture of PIC 16F877 is shown in the fig 3.2.Table 3.1 gives details about the specification of PIC 16F877. Fig 3.3 shows the complete pin diagram of the IC PIC 16F877.

Figure 3.2. ARCHITECTURE OF PIC 16F877

Table Specifications Table 3.1 gives specifications of PIC 16F877 microcontroller Table 3.1. PIC 16F877 Table Specification DEVICE PROGRAM FLASH DATA PROGRAM DATA EEPROM

PIC 16F877

8K

368 Bytes

256 Bytes

Pin Diagram of PIC 16F877 Figure 3.3 shows pin diagram of PIC 16F877 microcontroller

Figure.3.3 Pin Diagram of PIC 16F877

MEMORY ORGANIZATION There are three memory blocks in each of the PIC16F877 MUC. The program memory and data memory have separate buses so that concurrent access can occur. Program Memory Organization The PIC16F877 devices have a 13-bit program counter of addressing 8K * 14 words of FLASH program memory. Accessing a location above the physically implemented address will cause a wrap around. The RESET vector is at 0000H and the interrupt vector is at 0004H. Data Memory Organization The data memory is partitioned into multiple banks which contains the general purpose registers and the special functions resisters. Bits RP1 (STATUS<6) and RP0 (STATUS<5>) are the banks selected bits. Table 3.2 shows data memory partition. Table 3.2.Data Memory RP1:RP0 00 01 10 11 Banks 0 1 2 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, implement5ed 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.

PIC16F877 REGISTER FILE MAP Figure 3.4 shows register file ma of PIC 16F877

Figure.3.4. PIC16F877 REGISTER FILE MAP

General Purpose Register File The register file can be accessed either directly or indirectly through the File Selected Register (FSR). There are some Special Function Registers used by the CPU and peripheral modules for controlling the desired operation of the device. These registers are implemented as static RAM. The Special Function Registers can be classified into two sets, core (CPU) and peripheral. Those registers associated with the core functions. INSTRUCTION SET SUMMARY Each PIC 16F877 instruction is a 14-bit word, divided into an OPCODE which specifies the instruction type and one or more operand which further specifies the operation of the instruction. The PIC16F877 instruction set lists as follows. It shows the opcode field descriptions. 1. Byte-oriented 2. Bit-oriented and 3. Literal and control operations. Opcode Field Description Table 3.3 shows opcode field description Table 3.3.Opcode Field Description

PIC 16F877 Instruction Set Diagram for PIC instruction set list and mnemonic is shown in table 3.4 below. Table.3.4 Instruction Set

Potrebbero piacerti anche