Discussion on the design of embedded hardware circuitAnd the electronic development road is actually the same as most people said, the basic route is analog electronics (skilled) → digital circuit design (master) → single chip (project development) → ARM hardware design (project development) → linux learning → linux drive learning → ARM&linux underlying development (project development) → ARM&linux top-level development (project development) → project manager. Many people are still on the road to continue to explore, now I will share my lessons and experience for everyone, I hope to learn from the novice.
Embedded design is a huge project. Today we will talk about several considerations in hardware circuit design. First, we understand the embedded hardware architecture.
Everyone knows that the CPU is the soul of this system, and all peripheral configurations are associated with it, which also highlights a feature of embedded design that can be tailored. In doing embedded hardware design, the following points need attention.
Embedded hardware circuit design
First, the power is determined
The role of the power supply in the embedded system can be seen as the effect of air on the human body, and even more important: the air that people breathe has oxygen, carbon dioxide and nitrogen, but the content is stable, which is equivalent to various clutter in the power system. We hope to get a pure and stable power supply that meets the requirements, but due to various factors, it is only our dream. This should focus on two aspects:
Embedded systems require various levels of power, such as the common 5v, 3.3v, 1.8v, etc. In order to minimize the ripple of the power supply, LDO devices are used in embedded systems. If DCDC is not only big, its ripple is also a headache.
The normal operation of the embedded system not only needs to stabilize enough power, but also has enough current (in fact, the power meets the requirements), so you need to consider the load when selecting the power device. I usually leave a 30% margin when designing. .
If it is a multi-layer board, the power supply part needs to be split when the layout is in use. At this time, it is necessary to pay attention to the split path and try to put a certain amount of power together. If it is a double panel, the width of the trace should be taken care of and widened as much as possible if the board allows it. Proper decoupling capacitors should be placed as close as possible to the power pins.
Embedded hardware circuit design
Second, the crystal determines
The crystal oscillator is equivalent to the heart of the embedded system, and its stability is directly related to its operating state and communication performance. A common type of passive crystal oscillator, active crystal oscillator, must first determine its oscillation frequency, and secondly determine the crystal type.
a, passive crystal oscillator
The choice of matching capacitors and matching resistors is generally based on the reference manual. In the design of single-chip microcomputer, the plug-in crystal oscillator is often used to match the ceramic capacitor. In ARM, in order to reduce space and facilitate wiring, a four-corner passive crystal is often used in conjunction with the chip capacitor. Although we are familiar with the matching circuit of the fixed crystal oscillator, in order to achieve foolproof, it is necessary to refer to the reference manual to determine the size of the capacitor, whether it needs to match the resistor and other details.
b, active crystal oscillator
It has a better and more accurate clock signal, but in comparison, it is more expensive than a bare crystal, so this is also the cost that needs to be paid attention to in hardware circuit design.
When designing the board, you need to pay attention to the crystal trace as close as possible to the chip, and the key signal is away from the clock trace. Add a grounding protection ring as conditions permit. If it is a multi-layer board, also talk about the key signal away from the crystal oscillator.
Third, reserve test IO port
In the embedded debugging phase, when the pin resources are abundant, I usually reserve an IO port to connect the led or the speaker to pave the way for the preparation of the next software. The IO interface is properly controlled during the operation of the embedded system to determine whether the system is operating normally.
Embedded hardware circuit design
Fourth, external expansion storage equipment
If an embedded system has a power supply, a crystal oscillator, and a CPU, then this is the smallest system we are familiar with. If the embedded system needs to run a larger operating system, then not only the CPU needs to have an MMU, but the CPU also needs external SDRAM and NANDFLASH. If the CPU has SDRAM and NANDFLASH controllers, then the hardware design does not require excessive consideration of the use of address lines. If there is no associated controller, then you need to pay attention to the use of the address line.
This part is a key point in LAYOUT. The reason is to make the relevant signal lines equal in length to ensure that the signal delay is equal, and the clock and DQS differential signal lines are routed. In the wiring, various wiring techniques need to be comprehensively used, such as symmetric distribution with cpu, daisy chain wiring, T-type wiring, which needs to be selected according to the number of memory. Generally speaking, the more the number, the more complicated the wiring But knowing its key points, everything is solved.
Five, functional interface
The most important thing for an embedded system is to control the peripheral modules through various interfaces to achieve the designer's preset purpose. Commonly used interfaces are serial ports (can be used to connect Bluetooth, wifi and 3G modules), USB interface, network interface, JTAG interface, audio and video interface, HDMI interface and so on. Since these interfaces are connected to external modules, it is an important task to make electromagnetic compatibility design. In addition to this, pay attention to the use of differential lines when LAYOUT.
Six, the screen
This feature is listed separately because it is optional. If an embedded system is only connected as a connector to a peripheral module, connected to the host computer through the relevant interface or directly attached to the network, the screen is not needed. But if you make a consumer product that interacts with users frequently, you have to say a few words.
The capacitive screen is the first choice for embedded screens. In the circuit design, you need to pay attention to the layout of the touch screen connection line and the display connection line. In the process of routing, try to be as short as possible to the master cpu, and pay attention to the pairing signal to go the differential line, the RGB control signal goes the same length. The spacing of various signal traces follows the 3W rule to avoid mutual interference. In the design of the screen, it is necessary to ensure power and prevent interference, in case of screen splash screen and flower screen.