What is a PIC microcontroller?
The PIC microcontroller is an integrated circuit (IC) used to develop peripheral devices. A CPU with decentralized (multitasking) capabilities. Compared with humans, the brain is the CPU, and the part shared by PIC is equivalent to the human nervous system.
PIC microcontroller is a small computer
PIC microcontrollers have computational functions and memory memory like CPU and are controlled by software. However, processing power—the memory capacity is limited, depending on the type of PIC. However, their maximum operating frequency is about 20MHz, and the memory capacity is about 1K-4K bytes for writing programs.
The clock frequency is related to the time of the scanner and the time the program instructions are executed. However, the program processing capability cannot be judged only by the clock frequency, and it also changes with the architecture of the processing device (1*). If it is the same architecture, the processing power of the clock frequency will be stronger.
The word is used here to explain the program capacity. A word (2*) is used to represent a word. The memory (4*) capacity is usually expressed in bytes (3*). One byte has 8 bits, and each bit consists of 1 or 0. The instructions of the PIC16F84A microcontroller consist of 14 bits. When converting 1K sub-bits to: 1 x 1,024 x 14 = 14,336 bits. Then convert to byte: 14,336/(8 x 1,024) = 1.75K. When calculating the memory capacity, we specify 1G bytes = 1,024M bytes, 1M bytes = 1,024K bytes, 1K bytes = 1,024 bytes. They are not in multiples of 1000, because this is calculated in binary .
1. The physical structure of a computer, including organizational structure, capacity, the computer's CPU, memory, and interconnections between input and output devices. Often referred to as the organization of the CPU, including its registers, flags, buses, arithmetic logic components, instruction decoding and execution mechanisms, and timing and control components.
2. A language construct that indicates an operation and identifies its operand (if there is an operand)
3. A binary string that operates as a unit (operating), usually shorter than a word on a computer.
4. All addressable memory spaces within the processor and other internal memory used to execute instructions.
When calculating the memory capacity, we specify 1G bytes = 1,024M bytes, 1M bytes = 1,024K bytes, 1K bytes = 1,024 bytes. They are not in multiples of 1000, because this is calculated in binary .
It is possible to make the circuit very small with a PIC microcontroller.
Because the PIC microcontroller can make the calculation part, memory, input and output all in one chip. Therefore, she works very efficiently, her functions are freely defined, and she can flexibly adapt to different control requirements without having to replace different ICs. This way it is possible for the circuit to be small.
Second, what are the advantages of PIC series microcontrollers?
1) The biggest feature of PIC is that it does not engage in simple function accumulation, but starts from reality, pays attention to the performance and price ratio of products, and develops various models to meet different application requirements . In reality, different applications have different requirements for microcontroller functions and resources. For example, a motorcycle igniter needs a small single-chip microcomputer with less I/O, small RAM and program storage space, and high reliability. If a 40-pin and powerful single-chip microcomputer is used, the investment is not big, and it is also used. inconvenient. The PIC series has dozens of models from low to high to meet a variety of needs. Among them, PIC12C508 microcontroller has only 8 pins, which is the smallest single chip in the world.
The model has 512 bytes of ROM, 25 bytes of RAM, an 8-bit Timer, an input line, and 5 I/O lines. The market price is 3-6 yuan. Such a single-chip microcomputer is undoubtedly very suitable for applications such as motorcycle igniters. PIC's high-end models, such as the PIC16C74 (not the most advanced model), have 40 pins. The internal resources are 4K for ROM, 192 bytes of RAM, 8 channels of A/D, 3 8-bit timers, and 2 CCP modules. Three serial ports, one parallel port, 11 interrupt sources, and 33 I/O pins. Such a model can compete with other brands of high-end models.
2) Streamlined instructions make their execution efficiency much better . The PIC family of 8-bit CMOS microcontrollers has a unique RISC architecture, a Harvard bus structure with separate data bus and instruction bus, which allows the instruction to have a single word length and allows the number of bits of the instruction code to be more than 8 bits. Compared with the traditional 8-bit single-chip microcomputer with CISC structure, it can achieve 2:1 code compression and increase the speed by 4 times.
3) Zero time to market . Using PIC's low-cost OTP chip, the microcontroller can be used to market the product immediately after its application development.
4) PIC has a superior development environment . The real-time performance of the OTP MCU development system is an important indicator. Most of the development systems of the ordinary 51 MCU use high-end models to simulate low-end models, and their real-time performance is not ideal. PIC introduced a new simulation model at the same time as the launch of a new model. All development systems are supported by dedicated emulation chips, and the real-time performance is very good. As far as my personal experience is concerned, there have been no cases where the simulation results are different from the actual operation results.
5) Its pin has anti-transient capability , can be connected to 220V AC power through the current limiting resistor, can be directly connected with the relay control circuit, without isolation of the optocoupler, which brings great convenience to the application.
6) Complete confidentiality . The PIC protects the code with a secure fuse. The user blows the fuse after burning the code, and others can no longer read it unless the fuse is restored. At present, PIC uses a deep buried fuse process, and the possibility of recovering the fuse is extremely small.
7) The built-in watchdog timer can be used to improve the reliability of the program operation .
8) Sleep and low power modes . Although PIC is no longer comparable to the new TI-MSP430 in this respect, it is still adequate for most applications.
Third, the difference between PIC microcontroller and MCS-51 series microcontroller
It should be said that there are three main features:
(1) Bus structure : The bus structure of MCS-51 MCU is von Neumann type. The computer fetches instructions and data in the same storage space. The two can't be simultaneously; the bus structure of PIC MCU is Harvard structure, instruction and The data space is completely separate, one for instructions and one for data, which increases data throughput because both programs and data can be accessed simultaneously. Because the Harvard dual bus architecture is used in PIC microcontrollers, the difference from common microcontrollers is that the program and data buses can be of different widths. The data bus is 8-bit, but the instruction bus bits are 12, 14, and 16 bits, respectively.
(2) Pipeline structure : The instruction and execution of the MCS-51 MCU adopts a single instruction pipeline structure, that is, one instruction is taken, and one instruction is taken after execution; and the PIC instruction and execution adopt a dual instruction pipeline structure, when a When the instruction is executed, the next instruction is allowed to be fetched at the same time, thus implementing a single-cycle instruction.
(3) Register group : All registers of PIC microcontroller, including I/O port, timer and program counter, all adopt RAM structure, and only need one instruction cycle to complete access and operation; MCS-51 microcontroller needs Two or more cycles can change the contents of the register.
Remoter Controller,Remote Control,Wireless Remote, Universal Remote Control,universal remote
NINGBO COWELL ELECTRONICS & TECHNOLOGY CO., LTD , https://www.cowellsocket.com