PIC microcontroller is one of the commonly used devices. Every friend who studies PIC microcontroller will always encounter various problems in the learning process, such as the selection of PIC microcontroller. For the selection of PIC MCU, Xiaobian has brought a brief introduction. In this paper, the PIC microcontroller selection will be described in detail to help you clear the selection difficulties.
PIC microcontroller is equivalent to a small computer. PIC microcontroller is a kind of integrated circuit (IC) used to develop and control peripheral devices. A CPU with distributed function (multitasking). Compared with human beings, the brain is the CPU, and the shared part of PIC is equivalent to human nervous system. PIC microcontroller has calculation function and memory memory, like CPU, and is controlled by software. However, the processing capacity is generally limited, depending on the type of PIC. But their maximum operating frequency is about 20MHz, and the memory capacity is about 1k-4k bytes for writing programs.
It is possible to make the circuit very small with PIC microcontroller. And because PIC MCU can make the calculation part, memory, input and output in one chip. Therefore, she works with high efficiency and freely defined functions, and can flexibly adapt to different control requirements without having to replace different ICs. In this way, the circuit can be made very small.
Nowadays, there are a variety of SCM manufacturers with different product performance. According to the specific situation, which model should we choose? First of all, we need to make clear the differences between various models. We can learn a lot from the naming rules of PIC MCU.
It is necessary to know the naming rules before selecting PIC MCU.
The selection of single chip microcomputer is an important and painstaking task. If the selection is appropriate, the products will be cost-effective and stable; On the contrary, it may cause the product cost too high or affect the normal operation of the product, and even may not meet the pre design requirements. Generally speaking, the general selection principle is as follows:
PIC microcontroller selection skills
(1) “The chip content (function or quantity) is slightly larger than the design requirements”, “the design requirements should be completed as much as possible (with) chips (less peripheral devices)”（ 2) “Choose big (large factories) instead of small ones, choose more (large supply) instead of less, choose famous (famous brand) instead of small (misty, I don’t know the details), choose cheap (cheap) but better (quality assurance)”. It should be considered from the aspects of technology, practicability and developability
The capacity of MCU flash is determined according to the size of the program, and the capacity of flash must be greater than the code. For example, if your code size is about 50 KB, it is recommended that you choose a single chip microcomputer with a flash capacity of 64 kb or 128 KB.
The running speed of single-chip microcomputer depends on the clock frequency first. Generally speaking, the higher the clock frequency is, the faster the speed is for the single-chip microcomputer with the same structure. If your design requires high speed, then choose a microcontroller that runs faster. For example, in general, motor control applications mostly use 100ksps or higher sampling rate, so when MCU is used for motor control, the clock frequency should be high enough. In short, in the selection of MCU, we should choose the clock frequency according to the needs of the product, not one-sided pursuit of high speed, the higher the clock frequency, the greater the power consumption. In addition, the stability, anti-interference and other parameters of MCU are inversely proportional to the running speed of MCU. Therefore, we should try our best to find a single-chip microcomputer that can run at a high clock frequency and has low power consumption.
3. Peripheral requirements
If your design needs ADC, SPI, GPIO, USB and other peripherals, then you need to look for a single chip integrated with all these peripherals. Because, it is more economical to use a single chip microcomputer with the above peripherals than to use an ordinary single chip microcomputer and peripheral with a separate ADC. In addition, the integration of peripherals into MCU also means lower power consumption, because there is no peripheral circuit that can generate power consumption, and there is no copper coating that can generate power consumption for connecting peripheral circuits, only MCU itself generates power consumption.
4. Convenient development tools
This is a very important aspect, because development tools can greatly affect the power consumption of the products you design. Many companies have developed compilers with code optimization function, so when you compile code, the compiler will tell you the specific compilation information. You can optimize the code according to the compilation information to reduce the power consumption. For example, if you need to use ADC, UART, GPIO and other peripherals in your design, you need to initialize these devices. However, the use of UART in your design is conditional (only for displaying results during debugging). At this time, the compiler will prompt you to disable this peripheral to reduce power consumption. It must be said that this intelligent development tool is a blessing for developers.
5. Future requirements and compatibility
When designing a product, designers need to consider such issues as the product may need to be upgraded in the future. For example, if you need to add some functions to the design, you may need to add memory, peripherals, etc., and you may also need to increase the speed of the MCU. Therefore, in the selection of MCU, we need to find a balance between the current design requirements and the future design to meet the requirements of different degrees.
A good design should not only have perfect functions, but also meet the cost requirements. If the cost cannot be controlled, the best design is in vain. Therefore, it is necessary to reduce the cost of single chip microcomputer and even the whole product as much as possible.
7. Operating voltage (VCC)
The working voltage of single chip microcomputer is the voltage that can make it work normally. The higher the working voltage is, the higher the power consumption is. Therefore, in order to reduce the power consumption of the product, it is necessary to reduce the working voltage as much as possible.
In addition, I also suggest that designers choose the appropriate chip architecture according to the specific product requirements. If it is only a simple control application (such as lighting system, electronic toys, etc.), it does not need a chip with complex architecture like arm. In addition, for low-power design, MCU must have sleep mode. The use of sleep mode / low-power mode based on interrupt operation is a standard industry practice to reduce power consumption.
Last but not least, let’s talk about whether the chip is advanced or not. SCM is just a tool. The real effort lies in your professional knowledge. You should use the most suitable chip to make the most suitable product.