For years I've been using the following circuit to connect MCU's UART I/Os in a parallel bus:
As can be seen, transmitting from the Master MCU to the peripheral MCU's is pretty straightforward. Normal Tx lines are idle high and logic low. TXa is a push-pull output that drives the RXb, RXc and RXd inputs directly. But transmitting from the slaves requires the use of schottky diodes at their outputs so that they don't crash with one another when they go low. R1 is needed to pull RXa high when the line is idle.
This arrangement has the advantage of keeping the circuit simple by not using an OR gate IC to feed the RXa input. And it has the added advantage that no extra power is needed to make things work. And that's important because the circuit is battery powered.
Enter the cursed MCP2221A ... this chip is a USB to UART converter that I use quite frequently in the configuration already shown. But the darn thing has the nasty habit of sinking current through its TXd pin when the chip is powered off. That is, when the chip is energized, its TXd pin behaves like a normally high ordinary push-pull output. But when power is removed, its TXd somehow draws current from the line. And this has the effect of not only wasting unnecessary battery power, but it also lowers the voltage at RXa to about 2.25V when idle instead of the required 3.3V. This has the consequence of sometimes causing the wrong characters being received at RXa when they're transmitted from the slaves due to the line being on the threshold of the minimum voltage level required to qualify as a logic high.
To try to remedy this situation, I implemented the following arrangement in my circuit:
USB_Pwr represents power being applied to the MCP2221A and TXd represents the chip's transmission line, which can source or sink current. As can be seen, the circuit does exactly what I'd like it to do when an ideal nFet is used. That is, voltage levels at RXa are nice and steady when USB_Pwr is high, and have no reaction to changes in TXd when USB_Pwr is off.
BUT ... when I tried to use a REAL nFet such as the 2N7002 things went haywire ...
And silly me, being the stubborn type as some people here are already aware of, I decided to build the circuit and test it using a DMG2302U nFet just to see how it behaved.
And misbehave it did ... have a look at this mess:
The yellow trace shows the level of the RXa line while attempting the transmission of an "n" character from the MCP2221A to the Master MCU at 115,000 bauds.
I've already tried using other Fets and even a BJT transistor to no avail...
Again, I need an arrangement to block the MCP2221A's TXd pin from sinking current when the chip is off. And said arrangement should consume zero power (or as little as possible) while the MCP2221A is not powered.
ANY IDEAS?
As can be seen, transmitting from the Master MCU to the peripheral MCU's is pretty straightforward. Normal Tx lines are idle high and logic low. TXa is a push-pull output that drives the RXb, RXc and RXd inputs directly. But transmitting from the slaves requires the use of schottky diodes at their outputs so that they don't crash with one another when they go low. R1 is needed to pull RXa high when the line is idle.
This arrangement has the advantage of keeping the circuit simple by not using an OR gate IC to feed the RXa input. And it has the added advantage that no extra power is needed to make things work. And that's important because the circuit is battery powered.
Enter the cursed MCP2221A ... this chip is a USB to UART converter that I use quite frequently in the configuration already shown. But the darn thing has the nasty habit of sinking current through its TXd pin when the chip is powered off. That is, when the chip is energized, its TXd pin behaves like a normally high ordinary push-pull output. But when power is removed, its TXd somehow draws current from the line. And this has the effect of not only wasting unnecessary battery power, but it also lowers the voltage at RXa to about 2.25V when idle instead of the required 3.3V. This has the consequence of sometimes causing the wrong characters being received at RXa when they're transmitted from the slaves due to the line being on the threshold of the minimum voltage level required to qualify as a logic high.
To try to remedy this situation, I implemented the following arrangement in my circuit:
USB_Pwr represents power being applied to the MCP2221A and TXd represents the chip's transmission line, which can source or sink current. As can be seen, the circuit does exactly what I'd like it to do when an ideal nFet is used. That is, voltage levels at RXa are nice and steady when USB_Pwr is high, and have no reaction to changes in TXd when USB_Pwr is off.
BUT ... when I tried to use a REAL nFet such as the 2N7002 things went haywire ...
And silly me, being the stubborn type as some people here are already aware of, I decided to build the circuit and test it using a DMG2302U nFet just to see how it behaved.
And misbehave it did ... have a look at this mess:
The yellow trace shows the level of the RXa line while attempting the transmission of an "n" character from the MCP2221A to the Master MCU at 115,000 bauds.
I've already tried using other Fets and even a BJT transistor to no avail...
Again, I need an arrangement to block the MCP2221A's TXd pin from sinking current when the chip is off. And said arrangement should consume zero power (or as little as possible) while the MCP2221A is not powered.
ANY IDEAS?