当前位置:网站首页>OC, OD, push-pull explanation of hardware
OC, OD, push-pull explanation of hardware
2022-07-07 03:06:00 【ltqshs】

Clear and push-pull 、 Open a leak 、OC、OD
Push pull output
Push pull output (Push-Pull Output) It's made up of two MOS Or the triode is controlled by complementary control signals , The two tubes are always in the state that one is on and the other is off , Pictured 1 Shown :

chart 1 Push pull output structure
The biggest feature of push-pull output is that it can really output high-level and low-level , And it has driving ability at both levels .
Additional explanation :
The so-called drive capability , It means the ability to output current . For driving large loads ( That is, the smaller the internal resistance of the load , The greater the load ) when , for example IO Output is 5V, The load internal resistance of the drive is 10ohm, Therefore, according to Ohm's law, the current on the load under normal conditions is 0.5A( The calculated power is 2.5W). Obviously, it's just IO It is impossible to have such a large driving capacity , That is, there is no way to output such a large current . As a result, the output voltage will be pulled down , Not up to nominal 5V. Of course, if it's just the transmission of digital signals , Theoretically, the input impedance of the next stage should be high impedance , That is, it only needs to transmit voltage , There is almost no current , There is no power , So you don't need a lot of driving power .
For push-pull output , High output 、 The flow direction of current at low level is shown in the figure 2 Shown . So compared with the open drain output introduced later , When the output is high, the driving ability is much stronger .

chart 2 Filling current and pulling current
shortcoming
But one disadvantage of push-pull output is , If two push-pull output structures are connected together , An output high level , It's the one above MOS Conduction , Below MOS When closed ; At the same time, the other output is low , It's the one above MOS closed , Below MOS Conduction time . The current will flow from the first pin VCC Through the upper end MOS Then pass through the lower end of the second pin MOS Direct flow to GND. The resistance on the whole path is very small , There will be a short circuit , This may cause damage to the port . This is also why push-pull output cannot be realized " Line and " Why .
Open drain output
It is often said that the open drain output is opposite to the push-pull output (Open Drain Output), For the difference between open drain output and push-pull output, the most common saying is that open drain output cannot really output high level , That is, there is no driving ability at high level , It is necessary to complete external drive with the help of external pull-up resistance . For the pull-down resistance, please refer to this article : Easy to understand STM32 The top of the middle / Pull down resistance .
The following explains why the open drain output has no driving ability when the output is high from the internal structure and principle , And further compare with push-pull output .
First, we need to introduce some open drain outputs (OD) And open set output (OC). The principles and characteristics of these two outputs are basically similar , The difference between the following :
Open the leak and use MOS tube , Among them " leak " Refers to MOS The leakage pole of the tube
Open set uses triode , Among them " Set " It refers to the collector of the triode
Both of the these are output modes corresponding to push-pull output , Due to the use MOS There are many cases of pipe , Many times I use " Open drain output " This word replaces open drain output and open set output .
OC
The introduction starts with the open set output , Its principle circuit structure is shown in the figure 3 Shown .

chart 3 OC
chart 3 The circuit on the left is open (OC) Output the most basic circuit , When the input is high ,NPN Triode conduction ,Output Pulled to GND, The output is low level ; When the input is low ,NPN The triode is closed ,Output It's the equivalent of an open circuit ( High output resistance ). High output resistance at high level ( High resistance 、 Three states and floating They all mean the same thing ), At this time, there is no external driving capability . This is the biggest characteristic of open drain and open set output , How to use this feature to complete various functions will be introduced later . Although this circuit completes the function of open set output , But there will be input For the high , The output is low ;input For low , The output is high .
chart 3 The circuit on the right uses a triode to complete " Reverse phase ". When the input is high , The first triode turns on , At this time, the input end of the second triode will be pulled to GND, So the second triode closes , High output resistance ; When the input is low , The first triode is closed , At this time, the input end of the second triode will be pulled to the high level by the pull-up resistor , So the second triode turns on , The output is pulled to GND. such , The input and output of this circuit are in phase .
OD
Next, the open drain output circuit is introduced , Pictured 4 Shown . The principle is basically the same as that of open set output , Just replaced the triode with MOS nothing more .

chart 4 OD
Features and Applications
Then let's talk about opening and leaking 、 Characteristics and applications of open set output , Because they are similar , Unless otherwise specified in the following text , Then open drain is used to represent open drain and open set output circuits .
The main characteristic of open drain output is high level and no driving ability , The external pull-up resistor is needed to really output high level , Its circuit is shown in the figure 5 Shown .
chart 5 OD Door pull up
When MOS When the tube is closed , Open drain output circuit outputs high level , When the load is connected , The current flows from an external power source , Flow through the pull-up resistor RPU, Flow into the load , The last to enter GND.
An obvious advantage of this characteristic of open drain output is that it can easily adjust the output level , Because the output level is completely determined by the power level connected by the pull-up resistor . So where level conversion is needed , Very suitable for open drain output .
Another advantage of this feature of open drain output is that " Line and " function , So-called " Line and " It refers to the direct connection of multiple signal lines , Only when all signals are high , The combined bus is high level ; As long as any one or more signals are low , Then the bus is low . And push-pull output is not , If the high and low levels are connected together , There will be current backflow , Damage to the device .
push-pull 、 Open leak comparison

About push-pull output 、 Open drain output at STM32 Application in , Please move on to this article :STM32 in GPIO How it works . Straighten out the push-pull 、 After opening the leak , You can understand it a little bit better GPIO working principle .
Statement : The copyright belongs to the original author , In case of infringement, please contact Xiaobian to delete . Reference to the original 1:《 Hardware circuit design “OC/OD Output ”》, Reference to the original 2:《 Clear and push-pull 、 Open a leak 、OC、OD》.
边栏推荐
- MySQL
- Redis入门完整教程:问题定位与优化
- How to find file accessed / created just feed minutes ago
- The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
- Redis入门完整教程:客户端常见异常
- Django数据库(SQlite)基本入门使用教程
- Utilisation de la promesse dans es6
- PSINS中19维组合导航模块sinsgps详解(初始赋值部分)
- Unity uses maskablegraphic to draw a line with an arrow
- 巴比特 | 元宇宙每日必读:IP授权是NFT的破圈之路吗?它的难点在哪里?Holder该如何选择合作平台?...
猜你喜欢

How to write test cases for test coupons?

Error: could not find a version that satisfies the requirement xxxxx (from versions: none) solutions

Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (time synchronization part)

Redis入門完整教程:問題定比特與優化

Es6中Promise的使用

Use of promise in ES6

服装企业部署MES管理系统的五个原因

NuScenes数据集关于Radar数据的统计

Redis入门完整教程:客户端案例分析
![[secretly kill little partner pytorch20 days] - [Day1] - [example of structured data modeling process]](/img/f0/79e7915ba3ef32aa21c4a1d5f486bd.jpg)
[secretly kill little partner pytorch20 days] - [Day1] - [example of structured data modeling process]
随机推荐
Unity webgl adaptive web page size
从零安装Redis
Remember the problem analysis of oom caused by a Jap query
wireshark安装
Oracle connection pool is not used for a long time, and the connection fails
Introduction to ins/gps integrated navigation type
知识图谱构建全流程
Data analysis from the perspective of control theory
LeetCode 77:组合
Error in fasterxml tostringserializerbase
Redis getting started complete tutorial: replication topology
密码学系列之:在线证书状态协议OCSP详解
Left path cloud recursion + dynamic planning
“零售为王”下的家电产业:什么是行业共识?
QT Bluetooth: qbluetooth DeviceInfo
Convert widerperson dataset to Yolo format
A complete tutorial for getting started with redis: AOF persistence
The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
Unity uses maskablegraphic to draw a line with an arrow
Redis introduction complete tutorial: replication principle