Microcontroller µC (PIC) • What`s the meaning of PIC ? • Programmable Integrated Circuit = Microcontroller • A PIC is a one-chip-microcontroller. • A normal computer with a “normal” microprocessor is build with some chips (IC). • PIC`s are integrated in one single chip. But why not all the computers are build in this way. The answer is very simple. The performance of PIC`s is compared with a normal computer very low. • One-chip-microcontroller are used to solve small tasks in a simple and cheap way. A solution build in a discrete analog or digital way would be more expensive. • µController are small, cheap and easy to use. The development of the circuit is very simple and we can concentrate our intelligence in the development of the program for the PIC.
20
Embed
Microcontroller µC (PIC) What`s the meaning of PIC ? P rogrammable I ntegrated C ircuit = Microcontroller A PIC is a one-chip-microcontroller. A normal.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Microcontroller µC (PIC)• What`s the meaning of PIC ?• Programmable Integrated Circuit = Microcontroller
• A PIC is a one-chip-microcontroller.
• A normal computer with a “normal” microprocessor is build with some chips (IC).
• PIC`s are integrated in one single chip. But why not all the computers are build in this way. The answer is very simple. The performance of PIC`s is compared with a normal computer very low.
• One-chip-microcontroller are used to solve small tasks in a simple and cheap way. A solution build in a discrete analog or digital way would be more expensive.
• µController are small, cheap and easy to use. The development of the circuit is very simple and we can concentrate our intelligence in the development of the program for the PIC.
Microcontrollers
make small embedded applications with minimal external circuits possible
The 2. meaning of PIC• PIC is a family of Harvard architecture microcontrollers made by
Microchip Technology, derived from the PIC1650 originally developed by General Instrument`s Microelectronics Division.
• PICs are very popular for developers and hobbyists because of their low cost, wide availability, large user base, extensive collection of application notes, availability of low cost or free development tools, and serial programming (and re-programming with flash memory) capability.
• PICs were also commonly used to defend the security systems of popular consumer products (pay-TV, PlayStation), which attracted the attention of crackers.
• Microchip recently announced the shipment of its 5 billionth PIC processor.
Why to use PIC processors • There are different families of microcontrollers and what`s
the main difference.
CPU = central-processing-unit
ALU = arithmetic-logic-unit
RAM = random-access-memory
ROM = read-only-memory
<= RAM
<= RAM
<= ROM
Von Neumann Computer
• In a “von Neumann Computer” program-code and data are in the same memory. A normal personal-computer has exactly this architecture.
• Programs are loaded from the hard-disk in the RAM (random-access-memory) and executed. In the same memory are also the data and even the information of the BIOS-Chips (Basic-Input-Output-System) (from main-board, grafic-card or network-card, etc. are loaded in this memory.
• This design has problems with viruses as everybody knows from his own PC. A virus or a trojan can come as data in the PC and can change in executable program-code and do a lot of damages.
Harvard-architecture• A PIC is build in Harvard-design. Program-memory and Data-memory
(RAM) are totally separated. This is very useful specially for microcontrollers.
• With a PC we want to do all the time different tasks but a microcontroller is normally used only for one specialized task.
• Program-memories for PIC`s are another type of memory. It`s called ROM (Read-Only-Memory)
• The main differences between RAM and ROM :
• RAM => Read and Write Memory – Data are lost when the computer is switched off
• ROM => Read Only Memory – Data are stored when the computer is switched off
• ROM`s are ideal for PIC`s They don’t loose the information and they cannot be disturbed from viruses and trojans. The program for PICs is all the time available.
• Flash-EEPROM like EEPROM fast and compact but only datablocks are erasable
Memory- and bus-sizes
• Low price PICs have only a data-bus and a data-memory with 8 bits. But for a program-command 8 bits are not enough.
• Harvard-design permits the use of different sizes of data- and program-bus. Data-bus and –memory have for example 8 bit and and program-bus and -memory 12-, 14-, or 16- bit.
• For more sophisticated applications are also 16-, 24-, 32- bit Microcontroller available
• PICs from Microchip Technologie are available with 16-bit Data- and 24-bit program-bus and -memory
RISC and CISC
• In the processor-technology are two different designs in use :
• CISC = Complex Instruction Set Computer and
• RISC = Reduced Instruction Set Computer
• A CISC processor has a great and complex set of instructions and the programming is comfortable one command needs between
• 4 – 10 clock-cycles
• A RISC processor is faster because only a reduced set of instructions is used and one command needs normally only one clock-cycle
• PICs have a RISC processor and PIC16F84 has 35 instructions
PIC16F84PIN # NAME DESCRIPTION
1 RA2 Second pin on port A. Has no additional function.
2 RA3 Third pin on port A. Has no additional function.
3 RA4 Fourth pin on port A. TOCK1 which functions as a timer is also found on this pin
4 MCLR Reset input and Vpp programming voltage of a microcontroller
5 VSS Ground of power supply.
6 RB0 Zero pin on port B. Interrupt input is an additional function.
7 RB1 First pin on port B. No additional function.
8 RB2 Second pin on port B. No additional function.
9 RB3 Third pin on port B. No additional function.
10 RB4 Fourth pin on port B. No additional function.
11 RB5 Fifth pin on port B. No additional function.
12 RB6 Sixth pin on port B. 'Clock' line in program mode.
13 RB7 Seventh pin on port B. 'Data' line in program mode.
14 VDD Positive power supply pole.
15 OSC2 Pin assigned for connecting with an oscillator
16 OSC1 Pin assigned for connecting with an oscillator
17 RA0 Zero pin on port A. No additional function.
18 RA1 First pin on port A. No additional function.
• CPU (Control Processing Unit):• It is the most important part of a µC, and it's in charge of:• Addressing the instruction's memory.• Receiving code from the instruction that is running.• Decode the operation sent by the instruction• Search the operands• Store the result. • Its memory locations are called registers