GPIO port, general-purpose input and output, this everyone knows, but the input, output circuit is what, in fact, do not care too much, just configure the register, but still have to touch, in order to facilitate understanding, the introduction of the microcontroller The IO port schematic to illustrate (the reason is the same) Recognize the circuit: 1. Ordinary IO port As shown above (the red box is inside the board) 1. The base level (position â‘¡) is low, the PNP is turned on, then the microcontroller IO port output is low, when the base level (position â‘¡) to a high level, the PNP is turned on, then the microcontroller IO port output is high level 2. Note here that the 4-position is a pull-up resistor . The consideration for setting the pull-up resistor here is this. Suppose I want to output a current in the IO port of this microcontroller to drive the small lamp to illuminate. The position resistance of 1 is generally Around 20k, the current is 250uA, which is basically negligible. After adding a pull-up resistor, the total current = 1 position current + 4 position current (1 and 4 form a parallel circuit) 3. Why not set it, the position resistance R of 1 is smaller, so that the current is larger, you do not need a pull-up resistor? Because the MCU is the control unit, it is better to design a strong current into the peripheral circuit during design. If it is designed inside the MCU, it will burn out the board. This shows one of the functions of the pull-up resistor ---> increase the current, strengthen the ability to drive 2. Strong push-pull output: (meaning that it can input and output large current, it has been said that it is better not to design a large current inside the microcontroller, so the IO of this function should be used less) 1. The internal bus input is high level, the upper NPN is turned on, then the IO port outputs a large current (because the above triode VCC Power Supply is not connected with a pull-up resistor, I = VCC / resistor + NPN internal resistance), so the IO exit The place is usually connected to a resistor current limit internal bus to transmit low level, the following NPN is turned on, then if the IO port is connected to a VCC (without pull-up resistor), there will be a large current infusion. Here is another role of the pull-up resistor -> current limit 3. Open drain OC gate: What is the open-drain state of the IO port, as shown in the above figure, if the inner line is high level, the base level of the NPN is low level, and the NPN is not turned on at this time, then the IO port is equivalent to being suspended in the air at this time. So it is impossible to determine its state (do not know whether it is low or high), then this state is the open drain state, so it is impossible to output a high level to the peripheral circuit at this time, if you want to output a high voltage Flat, you must have a pull-up resistor on the collector of the NPN. At this time, it also shows a role of the pull-up: that is, the indeterminate signal is clamped (held) by a resistor at a high level, and the pull-down is the same. There is also an application for the OC gate, which can control the high-potential circuit. If the peripheral circuit requires a large voltage, the OC gate plus the pull-up resistor can be used to complete this function, as shown in the following figure, when the internal bus is high. , NPN cutoff, add a 12v pull-up resistor on the far right, so that the potential clamp is used in 12v for peripheral circuits.
According to the frequency, the Adapter has low frequency power adapter and high frequency power supply. The linear adapter is low
frequency adapter.
Linear dc power supply is working through the transformer to low the voltage of AC current,
and then obtain DC current through the rectifier circuit, and finally obtain a
small ripple voltage through filter.
Yidashun can offer different
specifications` linear psu such as 15V 200mA,
22V 200mA etc, and Yidashun's linear power adapter has the advantages of high stability, small ripples, and less interference and
noise and so on. OEM & ODM linear adapters are accepted by yidashun.
Linear Adapter,Linear Power Supply,Linear Universal Adapter,Linear Power Adapter Shenzhen Yidashun Technology Co., Ltd. , https://www.ydsadapter.com
Definition of GPIO port:
February 09, 2023