A PIC microcontroller (Peripheral Interface Controller) is an integrated circuit (IC) that controls peripheral circuits. It is a special microcomputer that integrates CPU, ROM (memory), I/O, etc. on a single chip. It is a CPU with decentralized (multi-tasking) functions.
PIC (please be sure to check the relevant information online.) series of single-chip microcomputers are the flagship products of the single-chip microcomputer series produced by the American Microchip (many words are blocked by the server and cannot be sent, I hope you know.) company. The characteristics of this series of single-chip microcomputers of this company are: First, it is the first to use the embedded structure of the reduced instruction set (RISC, we will learn about its instruction system later). It enables the single-chip microcomputer to break through the traditional natural dependence on the PC in structure. Second, the introduction of the Harvard bus memory structure, two-stage pipeline instruction structure, single-cycle instruction and other technologies effectively improves the operating efficiency of the system.
Classification of PIC 8-bit MCU: The current PIC series MCU ranks higher year by year in the world MCU market share, especially in the 8-bit MCU market. There are three series and multiple models of products available. MCUs are used in various fields, including computer peripherals, home appliance control, telecommunications, intelligent instruments, and automotive electronics. It can be said that the current PIC MCU is the most influential embedded microcontroller in the world.
Basic series: low price. Such as PIC16C5X, PIC12C5XX. (Search "chip query website" on Baidu, you can get a lot of detailed technical information of microchips, including pin arrangement, pin function, etc. There is a very famous chip query website, which is easy to find, and all the information is in English.) Second, intermediate series. This level is the most abundant series of PIC, with various packages from eight pins to sixty-eight pins. For example: PIC12C6XX. The performance of this level of products is very high, with internal A/D converter, E*E (E square) PROM data storage, comparator output, PWM, output, I*I (I square) and SPI interfaces. Third, advanced series. Such as PIC17CXX, the characteristic is fast speed, so it is suitable for high-speed digital computing occasions, and because it has the ability to complete 8X8 (bit) binary multiplication operations within one instruction cycle (160 nanoseconds), it can even replace some DSP products. This series is suitable for high- and mid-range electronic devices. (But this series is very expensive.)
These three series of PIC8-bit microcontrollers also have high code compatibility, and users can convert code from one model to another.
Features of PIC series microcontrollers: 1. Practical and cost-effective. For example, PIC12C508 has 512 bytes of ROM, 25 bytes of RAM, 1 8-bit timer, 1 input line, and 5 I/O lines, and the price is 3 to 6 yuan. This microcontroller is suitable for the application of motorcycle automatic ignition. 2. High efficiency. 3. Excellent development environment. 4. Strong anti-interference ability. PIC microcontroller can be connected to 220V AC power supply through current limiting resistor, and can be directly connected to relay control circuit without photocoupler isolation. 5. Absolute confidentiality. PIC uses confidentiality fuse to protect the code. After writing the code, the fuse is blown. Unless the fuse is restored, it is impossible to read the original code. However, PIC uses deep fuse buried technology, and the possibility of restoration is extremely small.
Development of PIC series single-chip microcomputers. Single-chip microcomputers are special microcomputers that integrate CPU, ROM, and I/O on a single chip. They have no development capabilities by themselves. To develop them into a practical product, certain development tools are needed. The development tools are divided into two categories: hardware development tools and software development tools. The former refers to various programmers, simulation development machines and other programming and development equipment; the latter refers to various editing, assembly, simulation debugging and integrated development environment tool software.
When you get a single-chip microcomputer, it is not usable yet. You need to write a program. How to receive data? How to process? How to apply the output? And so on... This is application programming! It is not like writing a program on a computer. If it is wrong, you can change it at will. Because the number of times the single chip is erased and written is too many, it is not good for the stable operation of the program itself. If it is a single chip that is written once, the consequences of the written program are wrong. Therefore, you must be familiar with some single-chip simulation software. They are different from Word, Ecxel... They have high conceptual, real and practical properties. So don't treat them as software that children can learn. If you have never burned a single chip, you are a novice. If you have never written assembly, even if your computer level is hundreds of levels, in the eyes of people who participated in the "64K Programming Competition" (check the "64K Programming Competition First Prize Program" on the Internet to see what kind of program can be written with 64K memory?), you are just a bug that got out of a pile of books. Technology is the realization of practice and theoretical application. We don't need those programming masters from Tsinghua University and Peking University because we don't have money and can't afford them. However, if you are willing, I also believe that we will have their technology one day. Let's skip the basic introduction for now and have a preliminary understanding of the instruction system.
Since the PIC instruction system is similar to the assembly instruction system, the PIC instruction system is more instructive, so I will not introduce the PIC instruction system first, but talk to you about the assembly language instruction system.
The following is an introduction to the pic instruction system:
First, what is an instruction system? The set of instructions that can be recognized and executed by a CPU is based on the instruction system of this CPU. Microcontrollers produced by different manufacturers, or microcontrollers based on different CPU cores, generally have different instruction systems. Therefore, in the future, we will choose the PIC produced by MicroChip as the BV experiment chip. The basic PIC16C5X series chip has a total of 33 instructions, each instruction is 12 bits long; the mid-range PIC16C6X/7X/8X series chip has 35 instructions, each instruction is 14 bits long: the high-end PIC17CXX series chip has a total of 58 instructions, each instruction is 16 bits long. You can definitely search for the instructions of each series of PIC chips on the Internet, and you can print them out for backup.
1. pic instruction system
Here is a program from the book, calculating the function value; Y = {X + 10 (X, 0), 30X [0, 10], X-190 (10, X)}
Source code:
DATA1 SEGMEMT
X DW ?
Y DW ?
DATA1 ENDS
CODE1 SEGMENT
…
MOV AX, X
CMP AX, 0
JGE CASE23
ADD AX, 10
JMP RESULT
Previous article:About the link script file of PIC's C18 compiler
Next article:Design of TPMS tire pressure monitoring system based on PIC microcontroller and SP12
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TPS546D24_C23 dynamic voltage regulation
- Sampling Theorem-------------What is the relationship between the detected signal and the ADC sampling rate?
- Showing off the products + CSR development board 10 years ago, when the Bluetooth market was just beginning to develop!
- LIN communication wake-up question
- An introduction to TI's high-efficiency integrated power supply selection and reference designs
- About the problem of the ambient light sensor of the rsl10-sense-gevk board not working well
- Can someone please help me analyze this transistor circuit? Is this parallel voltage negative feedback or parallel current negative feedback?
- 6410 Bare Metal Program
- The sine wave signal is distorted after passing through the op amp
- Update summary: justd0 analyzes the official routine of LSM6DSOX finite state machine