Can Pull-Up Resistors be Located on Either Side of Current-Limiting Resistors?
JRetSapDoog
Posts: 954
Hey, all. I'm curious: can 10K pull-up resistors be located on either side of 100 ohm current-limiting resistors? For example, in the case of adding a PS/2 keyboard, could 10K ohm pull-up resistors for the clock and data lines tee into those lines on the Prop-side of 100 Ohm current-limiting resistors, as opposed to being located off of the keyboard side? The schematic for the Propeller Demo Board shows them on the keyboard side, but given that the current-limiting resistors are only 1% of the resistance of the pull-ups, would it matter if the pull-ups were moved to the Prop side of the current-limiting resistors?
Offhand, I'm not seeing any reason that it wouldn't work (it seems that either the keyboard or Prop would still be able to pull the lines down below a logic 0 threshold and/or release the lines as needed). But that conclusion surprised me, so I thought I'd ask, since I could easily be missing something. But if such an arrangement will work, are there any caveats (such as a broken convention)? If the tee-in side doesn't matter, greater layout flexibility exists. I believe that the keyboard is implemented with open collectors on the clk/data lines and that the Prop pins are high impedance (set to inputs) when the keyboard lines need to be high (such as during idle). So, does the location of the pull-ups matter in this case with a 100:1 ratio for the pull-ups versus the current-limiting ones? Thanks.
Offhand, I'm not seeing any reason that it wouldn't work (it seems that either the keyboard or Prop would still be able to pull the lines down below a logic 0 threshold and/or release the lines as needed). But that conclusion surprised me, so I thought I'd ask, since I could easily be missing something. But if such an arrangement will work, are there any caveats (such as a broken convention)? If the tee-in side doesn't matter, greater layout flexibility exists. I believe that the keyboard is implemented with open collectors on the clk/data lines and that the Prop pins are high impedance (set to inputs) when the keyboard lines need to be high (such as during idle). So, does the location of the pull-ups matter in this case with a 100:1 ratio for the pull-ups versus the current-limiting ones? Thanks.
[A] Prop Pin ----/\/\/-----+-----/\/\/----- Vdd 100 | 10K | KBD CLK [B] KBD CLK ----/\/\/-----+-----/\/\/----- Vdd 100 | 10K | Prop Pin Above, [A] is the standard circuit, [B] is the proposed one. [C] Prop Pin --------------+-----/\/\/----- KBD CLK | 100 | /\/\/ 10K Diagram [C] is a completely equivalent version of [B], but drawn such that the Prop is kept at the left.
Comments
You put a pullup where the load is drawn. The current limiting resistors are to protect the Prop from driving a high against a ground.
If the keyboard sinks to ground and the prop drives high, the power is dissipated through the 100 ohm resistor instead of an argument breaking out between a FET and an open collector transistor.
It is best practice to put the protection device next to the device being protected and the pull-up next to the device with the open collector.
Still, it does seem to me like the circuit of diagram provides the same current-limiting protection in the specific case of the keyboard sinking to ground (which the keyboard often does as it provides the pulsing clock signal, though the MCU can inhibit that by bringing the line low) and the Prop driving the line high as an output (which the program shouldn't do, but...Murphy's Law). That is, in that non-desired state, the (conventional) current would flow out of the Prop, passed the pull-up junction point, through the 100 Ohm resistor, and then into the keyboard circuit's open collector. [Incidentally, I believe no (or almost no) current would flow through the pull-up in this undesirable case, as Vdd (or near Vdd) would exist on both sides of the pull-up with respect to ground.] So, if there's a meaningful difference between [A] and , I guess I'm not seeing it. Of course, conventions are meaningful in and of themselves.
I added an equivalent diagram [C] of the "proposed" (under consideration, as opposed to advised) circuit to Post #1 above and provide it below as well, the new version displaying the Prop on the left for the sake of comparison with circuit [A] (see above/below).