Summary of embedded hardware design
Power source determination
The role of the power supply for the embedded system can be seen as the role of air on the human body, even more important: the air people breathe has oxygen, carbon dioxide and nitrogen, but the content is stable, which is equivalent to all kinds of 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:
a, voltage
Embedded systems need a variety of power supplies such as 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 the DCDC is not only large, its ripple is also a headache. (LDO low voltage drop device)
b, current
The normal operation of the embedded system requires not only a stable enough power supply, but also enough current (in fact, the power to meet the requirements), so the load needs to be considered when selecting the power device, and I generally leave a 30% margin when designing.
If it is a multi-layer board, the power supply part needs to be divided when the layout, then it is necessary to pay attention to the partition path, and try to place a certain amount of power together. If it is a dual panel, the width of the line needs to be paid attention to, and the board should be as wide as possible. Keep the appropriate decoupling capacitor as close to the power pin as possible.
Second, crystal vibration determination
Crystal vibration is equivalent to the heart of embedded system, its stability is directly related to its running state and communication performance. Common vibration has no source crystal vibration, active crystal vibration, first to determine its oscillation frequency, and then to determine the type of crystal vibration.
a, passive crystal oscillator
The selection 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 quadrangle passive crystal oscillator is often used with a chip capacitor. Although we are familiar with the matching circuit of the fixed crystal oscillator, in order to achieve foolproof, we still need to see the reference manual to determine the size of the capacitor, whether it is necessary to match the resistance and other details.
b, active crystal oscillator
It has a better and more accurate clock signal, but in comparison, the price is higher than that of the crystal oscillator, so this is also the cost that needs to be paid attention to in the hardware circuit design.
When designing the circuit board, it is necessary to pay attention to the crystal oscillator line as close as possible to the chip, and the key signal is far away from the clock line. If conditions permit, add a ground protection ring. If it is a multi-layer board, it is also necessary to say that the key signal is away from the crystal oscillator.
3. Reserve test I/O ports
In the embedded debugging stage, in the case of abundant pin resources, I usually reserve an IO port to connect to the led or speaker, laying the groundwork for the next step of software writing. The IO interface is properly controlled during the operation of the embedded system, so as to judge whether the system runs normally.
4. External storage device expansion
If an embedded system has a power supply, crystal and CPU, then it 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 MMU, the CPU also needs external SDRAM and NANDFLASH. If the cpu has SDRAM and NANDFLASH controllers, then the hardware design does not need to consider the use of address lines. If there is no associated controller, then you need to pay attention to the use of address lines.
This part is a key point in the LAYOUT, the reason is to make the relevant signal lines equal in length to ensure that the signal delay is equal, the clock and DQS differential signal line routing. Various wiring skills need to be used comprehensively when wiring, such as symmetrical distribution with cpu, Daisy chain wiring, T-type wiring, which all need to be selected according to the number of memory, generally speaking, the more the number, the more complex the wiring, but know its key points, everything is solved.
Five, functional interface
The most important thing for an embedded system is to control the peripheral module through various interfaces to achieve the purpose of the designer. 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. Because these interfaces are connected to external modules, it is important to do a good job of electromagnetic compatibility design. In addition, pay attention to the use of difference lines in LAYOUT.
6. Screen
This feature is listed separately because it is dispensable. If an embedded system only acts as a connector to connect peripheral device modules, connect to a computer host through the relevant interface or hang directly on the network, then the screen is not needed. But if you make a consumer product that interacts with users frequently, you have to talk a little bit.
Capacitive screen is the first choice for embedded screens, in the circuit design need to pay attention to the layout of the touch screen connection line and the display screen connection line. In the process of wiring, try to get close to the main control cpu as short as possible, and pay attention to the difference line of the pairing signal and the equal length of the RGB control signal. The distance between various signals follows the 3W rule to avoid mutual interference. In the design of the screen, it is necessary to ensure power and prevent interference to prevent the appearance of the screen flash screen and flower screen phenomenon