PIC (Peripheral Interface Controller) is an integrated circuit (IC) used to control peripheral devices. It is a CPU with decentralized (multi-tasking) functions. Compared with humans, the brain is the CPU, and the shared part of PIC is equivalent to the human nervous system.
The PIC microcontroller is a small computer
PIC microcontrollers have computing functions and memory like a CPU and are controlled by software. However, the processing power-memory capacity is very limited, depending on the type of PIC. But their highest 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 it takes to scan a program and the time it takes to execute program instructions. However, the program processing capability cannot be determined solely by the clock frequency, as it also changes with the architecture of the processing device (1*). If the architecture is the same, a higher clock frequency will result in a higher processing capability.
Here, we use words to explain program capacity. One instruction (2*) represents one word. Memory (4*) capacity is usually represented by bytes (3*). A byte has 8 bits, each of which is composed of 1 or 0. The instructions of the PIC16F84A microcontroller are composed of 14 bits. When 1K bits are converted into bits, it is: 1 x 1,024 x 14 = 14,336 bits. Converting to bytes again is: 14,336/(8 x 1,024) = 1.75K. When calculating the capacity of memory, we stipulate that 1G bytes = 1,024M bytes, 1M bytes = 1,024K bytes, and 1K bytes = 1,024 bytes. They are not multiples of 1000 because this is calculated in binary.
1. The physical structure of a computer, including its organization, capacity, and interconnections between its CPU, memory, and input and output devices. Often refers specifically to the organization of the CPU, including its registers, flags, buses, arithmetic logic units, instruction decoding and execution mechanisms, and timing and control components.
2. A language construct that specifies an operation and identifies its operands (if any).
3. A binary string that is manipulated (calculated) as a unit, usually shorter than a computer word.
4. All addressable storage space within a processor and other internal memory used to execute instructions.
When calculating the capacity of memory, we stipulate that 1G byte = 1,024M byte, 1M byte = 1,024K byte, 1K byte = 1,024 bytes. They are not multiples of 1000 because this is due to binary calculation.
Using PIC microcontroller makes it possible to make the circuit very small.
Because the PIC microcontroller can integrate the calculation part, memory, input and output into one chip, it works very efficiently, has freely defined functions, and can flexibly adapt to different control requirements without having to replace different ICs. This makes it possible to make the circuit very compact.
2. What are the advantages of PIC series microcontrollers?
1) The biggest feature of PIC is that it does not simply pile up functions, but starts from reality, attaches importance to the performance and price ratio of products, and develops multiple models to meet application requirements at different levels.
This 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 ignition. The high-end model of PIC, such as PIC16C74 (not the highest-end model yet), has 40 pins, and its internal resources are 4K ROM, 192 bytes of RAM, 8-way A/D, 3 8-bit timers, 2 CCP modules, three serial ports, 1 parallel port, 11 interrupt sources, and 33 I/O pins. Such a model can be comparable to high-end models of other brands.
2) Streamlining instructions greatly improves execution efficiency. The PIC series 8-bit CMOS microcontroller has a unique RISC structure, a Harvard bus structure with separate data bus and instruction bus, which makes the instructions have a single word length and allows the number of bits of instruction code to be more than the number of bits of data. Compared with the traditional 8-bit microcontroller 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 allows the microcontroller to launch the product immediately after its application program is developed.
4) PIC has a superior development environment. The real-time performance of the OTP microcontroller development system is an important indicator. For example, most of the development systems of ordinary 51 microcontrollers use high-end models to simulate low-end models, and their real-time performance is not ideal. PIC launches the corresponding simulation chip at the same time as launching a new model. All development systems are supported by dedicated simulation chips, and the real-time performance is very good. In my personal experience, there has never been a case where the simulation results are different from the actual operation results.
5) Its pins have anti-transient capability and can be connected to a 220V AC power supply through a current limiting resistor. They can be directly connected to a relay control circuit without the need for optocoupler isolation, which greatly facilitates the application.
6) Complete confidentiality. PIC uses a confidential fuse to protect the code. After the user burns the code in, the fuse is blown and no one else can read it unless the fuse is restored. Currently, PIC uses a deep-buried fuse process, and the possibility of restoring the fuse is extremely small.
7) Built-in watchdog timer can be used to improve the reliability of program operation.
8) Sleep and low power mode. Although PIC cannot compare with the new TI-MSP430 in this aspect, it can still meet the needs in most applications.
3. The difference between PIC microcontroller and MCS-51 series microcontroller
It should be said that there are three main characteristics:
(1) Bus structure: The bus structure of the MCS-51 microcontroller is the von Neumann type. The computer fetches instructions and data in the same storage space, and the two cannot be performed at the same time; while the bus structure of the PIC microcontroller is the Harvard structure. The instruction and data spaces are completely separated, one for instructions and the other for data. Since the program and data can be accessed at the same time, the data throughput rate is improved. Because the Harvard dual bus structure is used in the PIC microcontroller, one difference from the common microcontroller is that the program and data buses can use different widths. The data bus is 8 bits, but the instruction bus bits are 12, 14, and 16 bits respectively.
(2) Pipeline structure: The instruction fetching and execution of the MCS-51 microcontroller adopts a single instruction pipeline structure, that is, fetching an instruction, executing it, and then fetching the next instruction; while the instruction fetching and execution of the PIC adopts a dual instruction pipeline structure, when one instruction is executed, the next instruction is allowed to be fetched at the same time, thus realizing single-cycle instructions.
(3) Register group: All registers of the PIC microcontroller, including I/O ports, timers and program counters, are in RAM structure and can be accessed and operated in just one instruction cycle; whereas the MCS-51 microcontroller requires two or more cycles to change the contents of a register.
Previous article:PIC microcontroller UPS power supply circuit diagram
Next article:14 Questions and Answers about PIC Microcontrollers
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Analysis of 2020 E-sports Contest C: The realization process of the 99-point ramp car
- MSP430F4152 development board schematic diagram
- ON Semiconductor - FOD83xx/T series is coming! Answer the questions to win prizes and apply for free samples
- #Power supply roadblock#Experience sharing summary
- Programming example of msp430 keypress
- Are there any recommended books for beginners in circuit development?
- MSP430 G2553 Launchpad implements capacitance measurement
- [GD32L233C-START Review] 12. Button - External Interrupt
- [Qinheng RISC-V core CH582] Environment configuration and lighting test
- Design and implementation of image cropping circuit based on FPGA