“From the appearance, if the pins of both buzzers are placed upward, it can be seen that the one with the green circuit board is the source buzzer, and the one without the circuit board and sealed with black glue is the active buzzer. buzzer.
“
1. If the MCU has a serial port peripheral, add a level conversion chip, such as MAX232 and SP3485, which are RS232 and RS485 interfaces.
2. RS485 adopts differential signal negative logic, +2~+6V means 0, -6~-2 means 1. There are two-wire and four-wire connections. The four-wire system is a full-duplex communication method, and the two-wire system is a half-duplex communication method. In RS485, the master-slave communication method is generally used, that is, a master with multiple slaves.
3. Modbus is a protocol standard that can support a variety of electrical interfaces, such as RS232, RS485, and can also be transmitted on various media, such as twisted pair, optical fiber, wireless.
4. Many MCU serial ports have their own FIFOs. The transceiver FIFO is mainly to solve the problem of low CPU efficiency due to frequent serial transceiver interrupts.
If there is no FIFO, the data will be interrupted and processed once without sending and receiving data. With FIFO, an interrupt can be generated to process the data after sending and receiving several data continuously (depending on the depth of the FIFO), which greatly improves the efficiency.
5. When some engineers are debugging their own systems, as soon as the system runs away, they immediately introduce a watchdog to solve the problem. Why do programs run away without thinking?
The program running away may be a bug of the program itself, or it may be a problem of the hardware circuit (it is susceptible to interference or itself is the source of interference). It is generally recommended that when debugging your own system, do not add a watchdog first, and then make up after the debugging is fully stabilized (except for the crisis of product safety and personal safety).
6. How to distinguish active buzzer and passive buzzer?
From the appearance, if the pins of both buzzers are placed upward, it can be seen that the one with the green circuit board is the source buzzer, and the one without the circuit board and sealed with black glue is the active buzzer. buzzer.
The active buzzer can sound continuously when it is directly connected to the rated power supply, while the passive buzzer, like the electromagnetic speaker, needs to be connected to the audio output circuit to sound.
7. The purpose of the voltage comparator is mainly the generation and transformation of the waveform, the interface from the analog circuit to the digital circuit.
8. Common ways of low-power wake-up: After the processor enters low-power, many activities are stopped. When an interrupt occurs, the processor can be woken up and returned from low-power mode to normal operation mode.
Therefore, before entering the low power consumption mode, it is necessary to configure the interrupts of various on-chip peripherals and allow them to continue to work in the low power consumption mode. If not, only a reset and power cycle can end the low power mode. After the processor wakes up, the interrupt service routine is executed first, and then the code in the main program is executed after exiting.
9. Register the interrupt service function: The interrupt service function has been written, but when the interrupt event occurs, the CPU still cannot find it, because we are still missing the last step: register the interrupt service function.
There are two methods for registration: one is to directly use the interrupt registration function. The advantage is that the operation is simple and the portability is good. The disadvantage is that the execution efficiency is reduced due to the remapping of the interrupt vector table into SRAM. , the advantage is very efficient, and the portability is determined not to be high.
10. Many MCUs provide digital power VDD/GND and analog power VDDA/GNDA. It is usually recommended to use two different 3.3V power supplies for power supply. However, in order to save cost, a single 3.3V power supply can also be used, but VDDA/GNDA should be separated from VDD/GND through an Inductor.
Generally, GNDA and GND should be connected together eventually. It is recommended to use a wire-wound inductor to connect and connect the contacts as close as possible to the chip (the inductor is best placed on the back of the PCB).
The Links: BSM10GD120DN2 CM75DY-34A BUY-igbt