About the structure of open collector (OC) or open drain (OD) output?

Source: Internet
Author: User

Link: http://computer00.21ic.org/user1/2198/archives/2006/11033.html

 

 

Let's talk about the structure of open collector output. Structure of open collector output 1 As shown in, the transistor on the right is not connected to any collector, so it is called open collector (the transistor on the left is used for reverse conversion, so that the input is" 0 ", The output is also" 0 "). For Graphs 1 When the input on the left side is" 0 ", The front of the transistor cutoff (that is, the Collector C With the launch pole E ), So 5 V Power supply passed 1 K The resistor is added to the right transistor, And the right transistor is turned on (that is, it is equivalent to a switch closed). When the left input is" 1 ", The front of the transistor conduction, and the rear of the transistor cutoff (equivalent to switching off ).

We will 1 Simplified Graph 2 . Figure 2 The switch in is under software control," 1 "Disconnected," 0 . Obviously, when the switch is closed, the output is directly grounded, so the output level is 0 . When the switch is disconnected, the output end is suspended, that is, the high-impedance state. The level status is unknown. If a resistance load (even a light load) arrives at the ground, the output level will be pulled to a low level by the load, therefore, this circuit cannot output a high level.

See figure 3. Figure 3 that 1 K The resistance is the pull-up resistance. If the switch is closed, the current goes from 1 K Resistance and switch flow through, but because the on and off and the resistance is 0 (For our convenience, the switch resistance is not 0 In addition, there is still a saturation voltage drop on the transistor), so the voltage on the switch is 0 That is, the output level is 0 . If the switch is disconnected, the current is 0 Therefore 1 K The pressure drop on the resistance is also 0 So the output voltage is 5 V In this way, the output is high. However, the internal resistance of the output is relatively large (that is 1 K (Ω), if the resistance is R Load, by calculating the partial pressure, you can calculate the final output voltage 5 * r/(R + 1000) V, that is 5/(1 + 1000/R) V. Therefore, if a certain voltage is required, R It cannot be too small. If R If the output voltage is too small, we only need to reduce 1 K To increase the drive capability. However, the pull-up resistance cannot be too small, because when the switch is closed, the current will be generated. Because the current that the switch can flow through is limited, the value of the pull-up resistance is limited, in addition, when the output power is low, the load may also provide a part of the current flowing through the switch. Therefore, we need to consider the current to choose the appropriate pull-up resistance.

If we connect the input end of a read data to the output end Io Port ( 51 Of Io The port is in this structure, where P0 Ports are not pulled internally, but the other three ports are pulled internally.) to use the input function, set the output port 1 That is, the switch is disconnected. P0 The port is in high-impedance mode.

For open-circuit (OD) output, the output is very similar to that of Open-collector output. Replace the above transistor with a Fet. In this way, the collector becomes the drain pole, the OC becomes the OD, And the principle analysis is the same.

 

Another output structure is push-pull output. The structure of the push-pull output is to replace the above pull-up resistor with a switch. When high-power output is required, the switch above is enabled and the switch below is disconnected. When low-power output is required, the opposite is true. Compared OC Or Od In this case, the high and low-level drive capabilities of the push-pull structure are very strong. If two output ports of different levels are connected together, a large amount of current will be generated, and the output ports may be burned out. As mentioned above OC Or Od The output won't be like this, 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 use a transport door on the output port), which can be used as the input state, AVR Some Single-Chip Microcomputer Io This is the structure of the port.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.