当前位置:网站首页>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》.
边栏推荐
- 新标杆!智慧化社会治理
- c语言字符串排序
- Digital scrolling increases effect
- Qpushbutton- "function refinement"
- 2022 spring recruitment begins, and a collection of 10000 word interview questions will help you
- Unity uses maskablegraphic to draw a line with an arrow
- 密码学系列之:在线证书状态协议OCSP详解
- Static proxy of proxy mode
- Change your posture to do operation and maintenance! GOPs 2022 Shenzhen station highlights first!
- Convert widerperson dataset to Yolo format
猜你喜欢
Redis入门完整教程:复制原理
HAVE FUN | “飞船计划”活动最新进展
Redis入门完整教程:复制配置
硬件之OC、OD、推挽解释
Huitong programming introductory course - 2A breakthrough
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?
uniapp的表单验证
Electrical engineering and automation
uniapp适配问题
Oauth2协议中如何对accessToken进行校验
随机推荐
Contribution of Writing Series
QT常见概念-1
[node learning notes] the chokidar module realizes file monitoring
Convert widerperson dataset to Yolo format
A complete tutorial for getting started with redis: problem location and optimization
Use of tensorboard
Install redis from zero
Number theory --- fast power, fast power inverse element
实施MES管理系统时,哪些管理点是需要注意的
Code line breaking problem of untiy text box
Form validation of uniapp
导数、偏导数、方向导数
Redis入门完整教程:AOF持久化
Five reasons for clothing enterprises to deploy MES management system
Redis introduction complete tutorial: replication principle
Redis入門完整教程:問題定比特與優化
NuScenes数据集关于Radar数据的统计
CSDN summer camp course project analysis
凌云出海记 | 易点天下&华为云:推动中国电商企业品牌全球化
Statistics of radar data in nuscenes data set