OC gate main application and circuit characteristics in the form of open drain

The OC gate is mainly used in three aspects: NAND and NAND, used for level conversion, and used as a driver. Open-drain circuits have the following characteristics:

1. Use the drive capability of an external circuit to reduce the internal drive of the IC or drive a load higher than the power supply voltage of the chip.

2. It is possible to connect Pins of multiple open-drain outputs to one line. Through a pull-up resistor, a "logical" relationship is formed without adding any devices. This is also the principle that I2C, SMBus and other buses determine the bus occupancy status.
3. Since the drain is open, the post-stage circuit must be connected to a pull-up resistor, and the power supply voltage of the pull-up resistor can determine the output level. This allows for any level of conversion.

4. The open source provides a flexible output, but it also has its weakness, which is the delay of the rising edge. Because the rising edge charges the load through an external pull-up passive resistor, when the resistance is selected, the hour delay is small, but the power consumption is large; otherwise, the delay is large and the power consumption is small. Therefore, if there is a requirement for the delay, it is recommended to use the falling edge output. Another output structure is a push-pull output. The structure of the push-pull output is to replace the upper pull-up resistor with a switch. When the output is high, the upper switch is turned on, and the lower switch is turned off. When the low level is output, the opposite is true. Compared with OC or OD, such push-pull structure is high and low-level drive capability is very strong. If the two output outputs of different levels are connected together, a large current will be generated, and the output port may be burned out. The OC or OD output mentioned above does not have such a situation because the current supplied by the pull-up resistor is relatively small. If the push-pull output is to be set to a high-impedance state, then both switches must be disconnected at the same time (or a transfer gate is used on the output port), which can be used as an input state. Some IO ports of the AVR microcontroller are of this type. ******* The internal logic of the MCU needs to be output to the outside after the internal logic operation. The external device may need a large current to be driven. Therefore, there must be a drive circuit at the output port of the MCU.

There are two forms of this kind of driving circuit: one of them is an N-type transistor-NPN or N-channel, and the NPN transistor is taken as an example, that is, e is grounded, b is connected to internal logic operation, and c is taken out. b can be controlled by the internal drive to control whether the transistor is turned on, but if the c-pole of the transistor is always floating, although there is no change in height on the b-pole, there is no high-low variation on the c-pole. Therefore, a resistor must be provided externally under such conditions. One end of the resistor is connected to c (lead pin) and the other end is connected to the power supply. When the b voltage of the triode has a high voltage, the triode is turned on, and the c voltage is low. When b is a low voltage, the triode is not connected, and the c pole is pulled under the resistance. high voltage. This kind of driving circuit has a characteristic: the low voltage is driven by a triode, and the high voltage is driven by a resistor - the upper and lower asymmetry, the internal resistance of the ec when the triode is turned on is small, so that a large current can be supplied, and the LED can be directly driven. Even relays, but the drive of the resistor is limited, the maximum high-level output current = (VCC-Vh) / r; the other is the complementary push-pull output, using 2 transistors, one on the top, the top on the top One is only n-type, the following is p-type (taking a triode as an example). The connection of two pipes is: NNC (top) c is connected to VCC, PNP (bottom) c is grounded, and two pipes are connected by ee, bb. Ee is used as the output (lead pin), and bb is connected to the internal logic.

This circuit is usually used for the final stage (audio) of the power amplification point. When bb is connected to a high voltage, the NPN tube turns on and outputs a high voltage. Since the ec resistance of the triode is small, the output high voltage has a strong driving capability. When bb is connected to a low voltage, NPN is turned off, and PNP is turned on. Since the ec resistance of the triode is small, the output low voltage has a strong driving capability. A simple example, 9013 ECT resistance is less than 10 ohms, Vh = 2.5v, VCC = 5v calculation, high-level output current maximum = 250MA, short-circuit current 500ma, this calculation also tells us that when using push-pull output Be careful not to have a short circuit in the external circuit, or you must burn the chip, especially when driving the transistor, don't forget to add a current limiting resistor at the base of the transistor. There are many forms of push-pull output circuits. Some microcontrollers use n-type tubes above and below, but the internal logic provides complementary outputs. The above description is only for the purpose of explaining the push-pull principle. For a deeper understanding, you can refer to the power amplifier circuit. ******* The pull-up resistor is very large, and the driving current provided is very small, called weak pull-up; otherwise, it is called strong pull-up.

Why use a pull-up resistor: Pull-up is to clamp an indeterminate signal through a resistor at a high level, and the resistor acts as a current-limiter at the same time. Pull-up is to inject current into the device, pull-down is output current, weak strength is only the resistance of the pull-up resistor is different, there is no strict distinction. The ability to boost current and voltage for non-OC, OD output circuits is limited. The function of the pull-up resistors is mainly to output current channels for open-collector output circuits.



The main application of pull-up resistors:
1. When the TTL circuit drives the COMS circuit, if the high level of the TTL circuit output is lower than the lowest level of the COMS circuit (generally 3.5V), then the pull-up resistor needs to be connected at the output end of the TTL to improve Output a high value.
2. When the OC gate circuit needs to output "1", it needs to add a pull-up resistor. If it is not added, there is no high level.
3. In order to increase the driving capability of the output pin, some of the single-chip pins often use pull-up resistors, but when the OC gate is used for driving (for example, controlling one LED), the current can be applied without the pull-up resistor. . 4. On the COMS chip, in order to prevent damage caused by static electricity, the unused pins cannot be suspended. Generally, the pull-up resistor is connected to reduce the input impedance and provide a discharge path.
5. Improve the anti-electromagnetic interference capability of the bus. When the pins are suspended, it is easier to accept external electromagnetic interference.
6. The resistance mismatch in long-line transmission is easy to cause reflected wave interference, and the pull-down resistor is resistance matching, which effectively suppresses reflected wave interference.

The selection criteria for the value of the pull-up resistor include:
1. It should be large enough to save power and the current sinking capacity of the chip; the resistance is large and the current is small.
2. It should be small enough to ensure sufficient driving current; the resistance is small and the current is large.
3. For high-speed circuits, excessive pull-up resistors may flatten the edges. Consider the above three points, usually between 1k and 10k. There is a similar reason for the pull-down resistor. ******* The pin-to-ground resistance is infinite when the high-impedance state is reached. At this time, the true level value can be read when the pin level is read. The important role of the high-impedance state is that the I/O (input/output) port is read into the external level at the time of input. The connection between the general gate and other circuits is nothing more than two states, 1 or 0. In a more complicated system, in order to transmit signals of different components on one transmission line, a corresponding logic device is called a three-state gate. Three-state gates, in addition to these two states, have a high-impedance state, which is high impedance (high resistance, equivalent to open circuit). Equivalent to the fact that the door is disconnected from the circuit connected to it. A tri-state gate is an output stage that extends the logic function and is also a control switch. Mainly for the bus connection, because the bus only allows only one user at a time. Typically, multiple devices are connected to the data bus, and each device is gated by a signal such as OE/CE. If the device is not strobed, it is in a high-impedance state, which is equivalent to not being connected to the bus and does not affect the operation of other devices. ******* The quasi-bidirectional port can only read 0 effectively, while the 1st method uses the non-zero reading method. When reading in, it must first write 1 to the IO and then read it. The true two-way port is just like its name, that is, true bidirectional IO does not require any pre-operation to read directly into the readout.

Infrared Pen

Infrared Pen,Infrared Touch Pen,Infrared Tablet Stylus Pen,Infrared Stylus Pencil

Shenzhen Ruidian Technology CO., Ltd , https://www.szwisonen.com

This entry was posted in on