It's time to case-up the 8088 system so I can reclaim my coffee/dinner-table. (I found this motherboard in a "scrap PCB's" box. Amazing it survived all those years of storage, nevermind the countless diggings-through-those-boxes!).
I've settled on an old ATX case, for now. So did some drilling because the screw-holes/posts aren't in the same positions... And found an old AT power-supply that fits in the spot. Had to do a little bit of nibbling, because the power-connectors interfered with the cutout, but that was easy-enough (man it's nice having a nibbler-tool again!).
Screwed everything down then realized the AT power-supply's cables were *way* too short.
Obvious solution: steal cables from another AT power-supply and use wire-nuts. And I even found an old AT power-supply that'd been de-cased with *really long* cables. So... simple, right?
Nah, for some reason I didn't go that route. I think it had something to do with a lack of interest in more nibbling, drilling, etc. to mount the Power Switch.
Well, besides that... this particular AT power-supply is clearly marked (in probably decade+ old marker-scrawl) "Runs Without A Load", which is something rare-enough that I like to save these guys for workbench power-supplies.
And... I have a box marked "computer power-supplies" where I thought I'd find a bunch of others, but instead discovered that it's full of ATX supplies. WTF. Just a few months ago, when my main computer's supply blew out, I couldn't find a friggin' ATX supply without stealing one from another half-assembled ATX computer, and yet here's a box full of 'em.
So, there's another box marked "Power Supplies" which is mostly oddities like 24V switchers and things pulled from old printers... but it also has a couple AT/XT supplies... but those things... well, they're *beasts* and would be darn-near incredible if I could fit 'em in an ATX case, let alone mount 'em.
OK, so... I didn't go the easy route of cutting the ATX-sized AT power-supply's cables and wire-nutting the *really long* cables I found on the long-scrapped AT power-supply (without a case). That'd've been easy.
--------------
Instead I decided to use an ATX supply. This isn't too difficult... Right?
Pinouts found. No problem. Scrapped an old connector from an old (fried) ATX mobo so I don't even have to modify the supply and can easily swap it out if, for some reason, e.g. I happened to have one in my collection which I'd forgotten to mark "bad"... (which surely most are, otherwise why would I have acquired so many?).
Power-On is pretty simple, tie that wire to ground when you want the system to be powered-on. Allow it to float (or be 5V) for power-off.
Simple-solution... Just throw a flip-flop in there... There's a 5V-standby voltage which is always-on, so that can drive my *really simple* TTL flip-flop circuit.
5Vsb ^ .--------------+-->/PWR_ON | | _________ | _|O '-| D Q | | |O | _ | | | | _| /Q |--' +----|>CLK | | |_________| \ / \ | v GNDWent to reach for my trusty ol' 74x74's but came across the 74x175's first... and have *a lot* of them. Sure-nough they're D-latches with /Q outputs. Perfect.
Wired the whole thing up on an old scrap PCB...
Oh, wait... I decided to throw in some debouncing:
5Vsb
^
|
\
/
\ .--------------+-->/PWR_ON
| | _________ |
_|O '-| D Q | |
|O | _ | |
| | _| /Q |--'
+--+-|>CLK |
| | |_________|
\ |
/ ===
\ |
| |
v V
GND
Aright. 1K up-top, and 10K down-below... seems totally reasonable.Grabbed the first 74x175 in the tube, happened to be 74LS175.
No Workie.
WTF... this is a *simple* circuit.
Troubleshooting for what seemed like hours, rechecking my scrap PCB had all the necessary traces cut, and rerouted. Whoops, forgot a wire... That should do it!
Nope.
Recheck again.
Nope, now I'm pretty certain it's wired right. Still not working.
Multimetering all the pins... This stupid LS175's pins were a bit corroded, didn't have the patience to thoroughly clean 'em, the solder-joints were a bit ugly... But, metering shows they're all making contact.
Finally power the thing up again and measure voltages...
The clock-input is sitting at something like 1.2V, well above Vil-max=0.8V. WTF?
Meh, I know TTL draws a bit of current through its inputs... maybe 10K was too much, but surely 5K would be *plenty*. Should
cut that 1.2V down to 0.6V, which is lower than Vil-max=0.8V, right...?
Just solder another 10Ker in parallel.
Nope. 1.1V, now. Something's seriously wrong with this circuit.
Rechecking traces... Again and again. And again, and again.
Finally decide that... since the solder-joints were so bad I'd used a *really hot* temperature, and *really long* durations to try to burn off that corrosion... Maybe I literally fried the chip.
Cut it off, dug out another from the tube, this 74175 (not LS/HC...) looks much cleaner. Soldered it up, much more carefully this time.
Now the clock-input is 1.7V. WTF?
WTF. I mean, I know these aren't CMOS, but this is getting ridiculous.5K isn't enough?!I check the datasheets... Iil-max ~= -0.5mA... I mean, we're *well* within specs, right? V=IR, 5 = 0.0005 * R, R=5/0.0005=10000 or something, right...? OK, so maybe 10K was cutting it close, but it should've worked, right?
Another parallel resistor, this time 2.2K... So we're measuring something like 1.5K. And... It works!
Alright, finally!
But now the clock-input is measuring 1.4V... which is *way* above Vil-max = 0.8V.
And it's toggling between that and something like 2.8V.
Mind completely boggled. And, still, the math doesn't make sense, it should've been *well* within specs, at this point... right? I *know* I've used 4.7K pull-up resistors with LS and other non-CMOS TTLs before...
---------
I vaguely recall something about pull-downs being less-common than pull-ups for a reason, but no idea what...
Search-fu...
I come across this comment: "Connecting a 10k resistor from an input to 0V will not necessarily pull the input low because TTL/LS inputs source current" (from here)
WTF?!
Am not wrapping my head around this...
I looked at the specs... something like 0.4mA leakage-current when low, and significantly less when high... 0.4mA isn't much. And I did the math... 10K should be *plenty* within-range... instead it's *way off*. And halving that didn't halve the voltage, in fact barely made a dent. Even weirder...
Still search-fu-ing... I really just expected there to be some sort of simple page explaining the use of pull-downs with TTL, like a tutorial, or a section in a chapter of a digital-logic book (and how is it I don't recall this from all my digital-logic studies? Must've lost that knowledge to time and lack-of-use). But instead, all I'm finding is forum-posts. I guess that works. Here's another.
"use low-ohm pull-down resistor; For TTL-LS gates (Iil<400uA, Vil<0.4V) the pull-down resistor can be 1kΩ .."
Jeeze that's low... What'm I missing?
And further comments suggest values as low as 470ohms. WTF? That's like the value you'd use when driving an old-school (pre today's high-brightness) LED from a 5V source (or tying one to an active-low TTL output). Those old LEDs take *way* more current than a TTL-input, certainly more than 400uA!
Now, an aside, y'all probably already figured out my fail... but at this point I'm *still* not getting it. And I've done a lot of digital-circuitry over the years. Certainly no expert, but yahknow well-trained over a decade ago, built a friggin' TTL raster-scan LCD driver several years prior to that... But, again, at this part in the story last-night, I am just not getting how 470 ohms could possibly be necessary to pull down an input. And, frankly, at this point I'm pretty certain the world's turned upside-down and I should start believing in magic over science.
So, after cursing the field of science for a while, for misleading me for so many years, it strikes me... Back In The Day TTL datasheets often showed internal circuit-diagrams... Of the actual BJT-layout (or an equivalent) used to create those gates. (I don't think you see this very often on parts these days).
Whelp, I didn't find the *entire* schematic, this time, but I did find this:
(from here)
WTF... the inputs aren't connected to the transistor's Base, but to the Emitter?!
Now I'm no BJT-expert, at all... but as i see it, there's a definite current-path from whatever circuitry's on the right to the input. (Is this an Emitter Follower?) Whatever...
Say the circuitry on the right looks like a resistor tied to the VCC rail... then, ignoring the diodes for a second (the two together would be greater than Vil-max=0.8V, anyhow)... Then, when you tie the input straight to ground (not through a resistor!), there's only one path for the current to flow through that imaginary pull-up resistor on the right-side.... And that is straight out the input terminal.
If the imaginary pull-up resistor happens to be 10K, then using the 10-1 rule-of-thumb, you'd have to have a 1K resistor on that input tied to ground to divide the voltage down low enough to be reliably registered "low".
And there yah have it. The danged input is *sourcing* current, just as the guy said.
----------
So where'd I go wrong in my hand-waiving calculations...?
Somehow I considered V=IR where V=5V-0.8V.
V is, in fact, 0.8V. I=0.4mA... V=IR -> R=V/I = 0.8/0.0004 = 2000ohms. My 5K was too great for my TTL-LS, and I'd switched to the regular ol' TTL before throwing the 2.2K in parallel (bringing it down to ~1.5K). That woulda been within-specs for the TTL-LS, but at this point I'd switched to the regular ol' TTL... which has: Iil-max = -1.6mA. So, recalculating: R=V/I = 0.8/0.0016 = 500 friggin' ohms.
The fact it works at all, with 1.5K (and toggling between 1.2V and 2.4V) is just luck, I guess... Bad luck, maybe, along with Good luck. Good in that it got it working, so at least I knew my digital design was sound (D=/Q, button->CLK, debounce-circuit)... Bad luck in that, maybe I've been throwing resistors at circuits for years that might've been out of spec but just happened to work, and might've gotten a bit too reliant on trusting these ol' rules-of-thumbs (yahknow, "10K should be fine for a pull-up/down").
I shoulda just seen it when they used a negative-sign in front of the Iil-max ratings... Negative indicating that current is leaving the input. Somehow that escaped me.
Really, this is all pretty basic ohms-law... I just failed. At the most-basic electronics fundamentals. Fail.
On the plus-side, It works... I'll throw yet another parallel resistor (four now) in there to make sure it's within-specs... And then I'll have a lovely circuit to remind me of this day. (Oh, I should probably throw in a header for the power-LED).
------
Update 12-24-16: Found a chapter in a book that makes mention of it... but again, very brief...
"The value of the pull-down resistor is relatively low because the input current required by a standard TTL gate may be as high as 1.6 mA"
See Figure 5-11 here, where they use a 330ohm pull-down resistor.
Of course, all these brief explanations are detailed-enough to get it right, if you don't make the stupid mistake I did. (V != 5 - 0.8).
------
Also, see the next log where I experience a very similar situation in an entirely different part of the circuit, mistakenly using a BJT in a weird way.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.