The difference between open-drain output and push-pull output of microcontroller I/O port

Publisher:大头玩家Latest update time:2014-12-04 Source: 21icKeywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

To realize line-and, an OC (open collector) gate circuit is required. It is two transistors or MOSFETs with the same parameters, which exist in the circuit in a push-pull manner, each responsible for the waveform amplification task of the positive and negative half cycles. When the circuit is working, only one of the two symmetrical power switch tubes is turned on at a time, so the conduction loss is small and the efficiency is high. The output can both inject current into the load and extract current from the load.

///////////////////////////////////////////////////// ////////////////////

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. A complete open-drain circuit should consist of an open-drain device and an open-drain pull-up resistor.

   
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 driving inside the IC. When the MOSFET inside 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 driving current is required inside the IC. As shown in Figure 1.
2. Multiple open-drain output pins can be connected to one line. Form 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 is 0. This is also the principle of I2C, SMBus and other buses to determine the bus occupancy status.



3. The transmission level can be changed 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. In this way, we can use low-level logic to control the output high-level logic.
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 microcontroller, an external pull-up resistor must be added if it wants to have input and output functions, otherwise it cannot output high-level logic).
5. The standard open-drain pin generally only has output capabilities. Adding other judgment circuits can have the ability of bidirectional input and output.

Notes 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. See 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 that of 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.

The I/O port of the 51 single-chip microcomputer is an open-drain output with weak driving capability, so a pull-up resistor is generally required to drive the next level circuit.

The AVR and STM8S series are true bidirectional I/O ports with push-pull output and current up to 20mA

Keywords:MCU Reference address:The difference between open-drain output and push-pull output of microcontroller I/O port

Previous article:4*4 matrix keyboard input digital tube based on stc89c52
Next article:External and incremental PID template programs

Recommended ReadingLatest update time:2024-11-22 20:49

Grounding scheme for single chip microcomputer measurement and control system
1. Grounding method of single chip microcomputer measurement and control system signal In the single-chip microcomputer measurement and control system, signal grounding is to determine a potential for the loop so that the circuit works in a stable state, and can compare the presence and size of the signal, and then
[Microcontroller]
Grounding scheme for single chip microcomputer measurement and control system
51 single chip microcomputer - DAC0832 - 06 - ①
DAC0832~I believe everyone is familiar with it. I want to sort it out. Are there three methods~~So this should also take two or three articles~~Take it slowly~~ This is a relatively simple introduction, but there are some things to note~~ 1. Introduction to DAC0832 1) DAC0832 pinout Of course, the first thing is
[Microcontroller]
51 single chip microcomputer - DAC0832 - 06 - ①
51 MCU program for oled display temperature alarm
The actual picture of the upper and lower values ​​of the temperature alarm limit produced by the oled display is as follows: The microcontroller source program is as follows: #include #include "oled.h" #define uchar unsigned char #define uint unsigned int unsigned char set=0; unsigned char code table ="01234
[Microcontroller]
51 MCU program for oled display temperature alarm
SferaLabs' new industrial I/O module is the first to use a Raspberry Pi MCU
The Raspberry Pi project started out as a hobbyist/maker resource and has grown into a major project for prototyping, development, and even mass production. Earlier this year, Raspberry Pi released its first chip, the MCURP2040. SferaLabs, an Italian company with a long history of modular designs based
[Industrial Control]
SferaLabs' new industrial I/O module is the first to use a Raspberry Pi MCU
PIC series microcontroller application design and examples
   1. Introduction    Today, as the application fields of   microcontrollers become increasingly widespread, applications in various fields have also put forward higher requirements for microcontroller manufacturers, hoping for faster speed, lower power consumption, smaller size, and cheaper price . And fewer periphe
[Microcontroller]
[51 microcontroller STC89C52] IO port simulates PWM control of SG90 servo
1. PWM PWM, the English name is Pulse Width Modulation, is the abbreviation of pulse width modulation. It modulates the width of a series of pulses to equivalently produce the required waveform (including shape and amplitude), and digitally encodes the analog signal level. That is to say, the changes in signals, ener
[Microcontroller]
[51 microcontroller STC89C52] IO port simulates PWM control of SG90 servo
Detailed analysis of the algorithm of single chip microcomputer digital filtering
 The main function of a single-chip microcomputer is to control peripheral devices and realize certain communications and data processing. However, in certain specific occasions, mathematical operations are inevitably used, although single-chip microcomputers are not good at implementing algorithms and performing comp
[Microcontroller]
Detailed analysis of the algorithm of single chip microcomputer digital filtering
Design and implementation of MCU for multi-point video conferencing control unit
0 Introduction The multipoint control unit (MCU) of a video conference is the core device of a video conference system. All terminals participating in the conference can establish a one-to-one connection with the MCU. The terminal is responsible for collecting the sound and image of the venue, and then tran
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号