当前位置:网站首页>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》.
边栏推荐
- Planning and design of double click hot standby layer 2 network based on ENSP firewall
- Derivative, partial derivative, directional derivative
- 从 1.5 开始搭建一个微服务框架——日志追踪 traceId
- Huitong programming introductory course - 2A breakthrough
- Cloud Mail . NET Edition
- Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (time synchronization part)
- Redis入門完整教程:問題定比特與優化
- 又一百万量子比特!以色列光量子初创公司完成1500万美元融资
- Simple bubble sort
- Kubernetes源码分析(二)----资源Resource
猜你喜欢
左程云 递归+动态规划
首届“量子计算+金融科技应用”研讨会在京成功举办
Nuggets quantification: obtain data through the history method, and use the same proportional compound weight factor as Sina Finance and snowball. Different from flush
Form validation of uniapp
[2022 national tournament simulation] polygon - computational geometry, binary answer, multiplication
Read fast RCNN in one article
[socket] ① overview of socket technology
Redis Getting started tutoriel complet: positionnement et optimisation des problèmes
PSINS中19维组合导航模块sinsgps详解(时间同步部分)
LeetCode 77:组合
随机推荐
Niuke programming problem -- double pointer of 101 must be brushed
Five reasons for clothing enterprises to deploy MES management system
Safety delivery engineer
MMDetection3D加载毫米波雷达数据
Es6中Promise的使用
PSINS中19维组合导航模块sinsgps详解(滤波部分)
mos管实现主副电源自动切换电路,并且“零”压降,静态电流20uA
Oracle中日期的使用方法实例
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?
Detailed explanation of 19 dimensional integrated navigation module sinsgps in psins (time synchronization part)
Matlb| economic scheduling with energy storage, opportunity constraints and robust optimization
mos管實現主副電源自動切換電路,並且“零”壓降,靜態電流20uA
A complete tutorial for getting started with redis: AOF persistence
Babbitt | metauniverse daily must read: is IP authorization the way to break the circle of NFT? What are the difficulties? How should holder choose the cooperation platform
ERROR: Could not find a version that satisfies the requirement xxxxx (from versions: none)解决办法
Error in fasterxml tostringserializerbase
惯导标定国内外研究现状小结(删减版)
Convert widerperson dataset to Yolo format
Django数据库(SQlite)基本入门使用教程
Qpushbutton- "function refinement"