Push-pull output: can output high and low levels and connect digital devices;
Open drain output: The output terminal is equivalent to the collector of the transistor. A pull-up resistor is required to obtain a high level state. It is suitable for current-type driving and has a relatively strong ability to absorb current (generally within 20ma).
The push-pull structure generally refers to two transistors being controlled by two complementary signals, and one transistor is always turned on while the other is turned off.
Let's first talk about the structure of open collector output. The structure of open collector output is shown in Figure 1. The collector of the transistor on the right is not connected to anything, so it is called open collector (the transistor on the left is used for inversion, so that when the input is "0", the output is also "0"). For Figure 1, when the input on the left is "0", the front transistor is cut off (that is, the collector C and the emitter E are equivalent to being disconnected), so the 5V power supply is added to the transistor on the right through the 1K resistor, and the transistor on the right is turned on (that is, it is equivalent to a closed switch); when the input on the left is "1", the front transistor is turned on, and the back transistor is cut off (equivalent to a closed switch).
We simplify Figure 1 to Figure 2. The switch in Figure 2 is controlled by software and is open when "1" and closed when "0". It is obvious that when the switch is closed, the output is directly grounded, so the output level is 0. When the switch is open, the output terminal is suspended, that is, high impedance state. At this time, the level state is unknown. If a resistive load (even a very light load) is connected to the ground, the level of the output terminal will be pulled to a low level by this load, so this circuit cannot output a high level.
Let's look at Figure 3 again. The 1K resistor in Figure 3 is the pull-up resistor. If the switch is closed, current will flow through the 1K resistor and the switch, but because the switch has internal pull-ups on the other three ports, when we want to use the input function, we only need to set the output port to 1, which is equivalent to the switch being disconnected, and for the P0 port, it is in a high impedance state. [page]
For open drain (OD) output, it is very similar to open collector output. Just replace the above transistor with a field effect transistor. In this way, the collector becomes the drain, and OC becomes OD. The principle analysis is the same.
Another output structure is push-pull output. The push-pull output structure is to replace the upper pull-up resistor with a switch. When a high level is to be output, the upper switch is turned on and the lower switch is turned off; when a low level is to be output, it is just the opposite. Compared with OC or OD, such a push-pull structure has strong high and low level driving capabilities. If two output ports with different output levels are connected together, a large current will be generated, which may burn out the output port. The OC or OD output mentioned above will not have such a situation because the current provided by the pull-up resistor is relatively small. If the push-pull output is to be set to a high impedance state, the two switches must be disconnected at the same time (or a transmission gate is used on the output port), so that it can be used as an input state. Some IO ports of AVR microcontrollers have this structure.
Open-drain circuit characteristics and applications
When designing circuits, we often encounter the concepts of open drain and open collector.
The "drain" mentioned in the concept of the so-called open-drain circuit refers to the drain of the MOSFET. Similarly, the "collector" in the open-collector circuit refers to the collector of the transistor. The open-drain circuit refers to a circuit with the drain of the MOSFET as the output. The general usage is to add a pull-up resistor to the circuit outside the drain. The complete open-drain circuit should be composed of an open-drain device and an open-drain pull-up resistor. As shown in Figure 1:
Figure 1
The circuit that makes up the open-drain form has the following characteristics:
1. Use the driving capability of the external circuit to reduce the internal drive of the IC (or drive a load higher than the chip power supply voltage). When the internal MOSFET of the IC is turned on, the driving current flows from the external VCC through R pull-up, MOSFET to GND. Only a very low gate drive current is required inside the IC. See Figure 1.
2. Multiple open-drain output pins can be connected to one line. This forms an "AND logic" relationship. As shown in Figure 1, when any one of PIN_A, PIN_B, and PIN_C becomes low, the logic on the open-drain line becomes 0. This is also the principle of I2C, SMBus and other buses to determine the bus occupancy status. If used as an output, a pull-up resistor must be connected. When connected to a capacitive load, the falling delay is the transistor in the chip, which is an active drive with a faster speed; the rising delay is a passive external resistor with a slow speed. If high speed is required, the resistance should be small and the power consumption will be large. Therefore, the selection of load resistance should take into account both power consumption and speed.
3. You can change the transmission level by changing the voltage of the pull-up power supply. As shown in Figure 2, the logic level of the IC is determined by the power supply Vcc1, and the output high level is determined by Vcc2 (the power supply voltage of the pull-up resistor). In this way, we can use low-level logic to control the output high-level logic (so you can perform arbitrary level conversion). (For example, adding a pull-up resistor can provide TTL/CMOS level output, etc.)
Figure 2[page]
4. If the open drain pin is not connected to an external pull-up resistor, it can only output a low level (therefore, for the P0 port of the classic 51 single-chip microcomputer, an external pull-up resistor must be added if it wants to have input and output functions, otherwise it cannot output high-level logic). Generally speaking, open drain is used to connect devices of different levels and match the levels.
5. Standard open-drain pins generally only have output capabilities. Adding other judgment circuits can enable bidirectional input and output capabilities.
6. The normal CMOS output stage consists of two tubes, upper and lower. Removing the upper tube will result in OPEN-DRAIN. This output has two main purposes: level conversion and line-and.
7. The wired-and function is mainly used in situations where multiple circuits pull down the same signal. If this circuit does not want to pull down, it will output a high level. Because the tube on the OPEN-DRAIN is removed, the high level is achieved by an external pull-up resistor. (For a normal CMOS output stage, if one output is high and the other is low, it is equivalent to a power short circuit.)
8. OPEN-DRAIN provides a flexible output mode, but it also has its weakness, which is the delay of the rising edge. Because the rising edge charges the load through an external pull-up passive resistor, when the resistor is small, the delay is small, but the power consumption is large; on the contrary, the delay is large and the power consumption is small. Therefore, if there is a requirement for delay, it is recommended to use the falling edge output.
Note in application:
1. The principles of open drain and open collector are similar. In many applications, we use open collector circuits instead of open drain circuits. For example, an input pin is required to be driven by an open drain circuit. Then our common driving method is to use a triode to form an open collector circuit to drive it, which is convenient and cost-saving. As shown in Figure 3.
2. The resistance value of the pull-up resistor R pull-up determines the speed of the edge of the logic level conversion. The larger the resistance value, the lower the speed and the lower the power consumption. Vice versa.
Push-Pull output is generally called push-pull output. It should be more suitable than CMOS output in CMOS circuits because the push-pull output capacity in CMOS cannot be as large as bipolar. The output capacity depends on the area of the N-tube and P-tube of the internal output electrode of the IC. Compared with open-drain output, the high and low levels of push-pull are determined by the power supply of the IC, and simple logic operations cannot be performed. Push-pull is the most commonly used output stage design method in CMOS circuits.
Of course, open drain is not without cost, that is, the output drive capability is very poor. It is not accurate to say that the output drive capability is very poor. The drive capability depends on the power of the final transistor in the IC. OD only brings a delay on the rising edge, because the rising edge charges the load through an external pull-up passive resistor. When the resistor is small, the delay is small, but the power consumption is large. On the contrary, the delay is large and the power consumption is small. OPEN DRAIN provides a flexible output method, but it also has a price. If there is a requirement for delay, it is recommended to use the falling edge output.
The premise of small resistance and small delay is that the principle of resistor selection should be within the allowable range of power consumption of the final transistor. Experienced designers will not choose a 1 ohm resistor as a pull-up resistor when using logic chips. At the rising edge of the pulse, the power supply charges the load through the pull-up passive resistor. Obviously, the smaller the resistance, the shorter the rise time. At the falling edge of the pulse, in addition to the load discharging through the active transistor, the power supply also forms a path to the ground through the pull-up resistor and the turned-on transistor, which brings problems such as power consumption and power consumption of the chip. The resistor affects the rising edge but not the falling edge. If you don't care about the rising edge during use, the pull-up resistor can be selected as large as possible to reduce the current in the path to the ground. If the rising edge time is required to be high, the selection of the resistor size should be based on the chip power consumption.
Open-drain output means no output voltage, it is grounded when low level, and not grounded when high level. If an external pull-up resistor is connected, the voltage will be pulled to the power supply voltage of the pull-up resistor when the output is high level. This method is suitable when the voltage of the connected peripheral is lower than the voltage of the microcontroller.
Push-pull output means that the microcontroller pin can directly output a high-level voltage. It is grounded when it is low level, and outputs the microcontroller power supply voltage when it is high level. This method does not require a pull-up resistor. However, if the output terminal may be grounded, outputting a high level at this time may cause the microcontroller to run unstably, and may even burn out the pin.
Previous article:From the bottom of my heart - for beginners who like single chip microcomputers
Next article:Microcontroller knowledge - structure and related companies
Recommended ReadingLatest update time:2024-11-23 08:17
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- The influence of short-term stability of oscillator on speed measurement accuracy in measurement and control system
- TI IC:cc2540 configuration
- DaVinci Technology DSP TMS320DM648
- [Zero-knowledge ESP8266 tutorial] Quick Start 13 - 1-digit digital tube display
- Analog circuit experiment box
- Designing a compact, efficient and high-performance multi-parameter patient monitor
- Free shipping! New FPGA core board (with power cord)
- 【CH579M-R1】+monochrome OLED screen display
- How to report a fault of optocoupler A316J
- ESP32 Study Notes 2---WS2812 16*16 Dot Matrix