10K pullup on signal takes 1us to take it back high - Page 1
Forum section: electronics / projects

author: alank2
author_rank: Super Contributor
timestamp: May 05, 2018, 02:22:32 am
content: I am finally working on some AVR code for me Z80 with AVR I/O project. It is currently on 3 pcb's using arduino type stackable header separating the boards. The bottom PCB is the Z80 with the 10K pullups on certain control lines. Middle PCB is SRAM. The top PCB is the AVR pcb and it pulls some of the Z80 signals low.The waveform below is the WAIT signal. Pulled up to 5V by 10K resistor on the Z80 board. On the AVR board when the right IORQ is asserted, it triggers a flip flop that outputs to a logic level mosfet. You can definitely see it snap down, but when releasing it looks like it might take around 1us to get all the high again. If I change the 10K to something smaller, I'm assuming it will have a faster rise time?I had a similar problem when using the AVR to assert a signal by switching it between HiZ and output low. Well, that part goes fine. If I take it from output low directly back to HiZ, there seems to be a sort of bounce effect where it goes high, then bounces low a few times. If I set the AVR PORT high first (output high), then next instruction switch it to HiZ/input which makes the PORT become a pullup, then disable the PORT/pullup, it is then smooth. Is this because I was sinking it and just slammed up a wall with the HiZ? Does doing the output high first give it the 50K or so pullup when switching to HiZ so it doesn't bounce?My logic analyzer is connected via 12" or so cables to the header on the top/AVR board.

author: C
author_rank: Super Contributor
timestamp: May 05, 2018, 03:16:09 am
content: TTL has different current capability for outputs in low state vs high state.You use pull-up resistors because an output low can overcome the pull-up.You can have a pull-up on a normal output.As you lower pull-up resistor value, you are also loosing number of TTL inputs that can be connected.A normal TTL output uses transistors for both directions of change. It takes current to make a logic level change.When you have a long bus that uses TTL you might see resistor pack containing 330/220 resistors terminating the line.A step up from this is active termination, a resistor connected to a voltage level between logic high & low.Open collector logic is slower than Tri-state where you have active in both directions.For tri-state logic, good design is having logic level be what you want before going tri-state.For your Z80 wait input, why not drive it both ways?Not hard to have a logic gate combine a bunch of wait outputs if you need this.Then pull-up is just to hold logic level and not used to make a change.C

author: alank2
author_rank: Super Contributor
timestamp: May 05, 2018, 03:34:13 am
content: The Z80 I'm using is CMOS.I was trying to have the signals setup so that more than component could pull it to ground...

author: DaJMasta
author_rank: Super Contributor
timestamp: May 05, 2018, 04:30:42 am
content: Smaller resistor will be faster rise time, but a totem pole driver instead of a single mosfet would allow you to drive the line high as well. You can also try to reduce the capacitance of the control line, which will lower the RC time constant - though I think in your case the control line is under 100pF, and it's just the relatively weak pullup that's making the charge slow. Many serial data lines that require a pullup will go with half that as a baseline pullup value, with considerably less recommended for high speed operation... so maybe try 4.7k and if it's still too slow, swap to 3.3k or 2.2k.

author: Ian.M
author_rank: Super Contributor
timestamp: May 05, 2018, 07:37:42 pm
content: From risetime=2.2*R*C, it looks like you've got 45pF of capacitance on that line - which is pretty good going for a three board stack. Obviously you can reduce the pullup as has been suggested, but another option would be to use current mirrors hung off the +5V rail. One MMPQ2907A quad PNP could pull up three lines with one resistor to set the current, and a small capacitor B-E to minimise crosstalk. If you go for the same 0.5mA it takes to hold the line low with the 10K pullup resistor, you'll speed up the rise time by a factor of 2.2

author: Zero999
author_rank: Super Contributor
timestamp: May 05, 2018, 08:03:57 pm
content: A current mirror is a good idea. If you have a CD4007 handy then you might be able to use that, but it won't be as good as the MMPQ2907A mentioned above.Is there any reason why a push-pull line driver, such as the 74HCT241 or 74HCT244 can't be used? They can be set to a high impedance state, if the line needs to be controlled by something else.

author: alank2
author_rank: Super Contributor
timestamp: May 05, 2018, 09:31:20 pm
content: I changed it to 3.3K and it rises much better now. I'll have to lookup a current mirror and see what it does!

author: Ian.M
author_rank: Super Contributor
timestamp: May 05, 2018, 10:48:09 pm
content: Here's a comparison of different pullups in LTspice. Sorry I couldn't post it earlier as my PC was down for maintenance and I was posting on a Raspberry Pi.

author: maginnovision
author_rank: Super Contributor
timestamp: May 06, 2018, 05:16:50 am
content: Just for reference the standard pullups on the z80 based computer I'm working with are 2k to 5 volts

author: alank2
author_rank: Super Contributor
timestamp: May 06, 2018, 03:23:18 pm
content: Interesting. The few schematics I've seen showed 10K. It is much cleaner now at 3.3K.

author: Ian.M
author_rank: Super Contributor
timestamp: May 06, 2018, 04:01:40 pm
content: Looking at it further, there's excessive interaction if you try to use one quad PNP array as a three way current mirror. Any means of fixing that pushes up the parts count excessively. A better approach would be to use it as two separate current mirrors each with their own current set resistor, which also means you don't need a B-E capacitor so the parts count per line pulled up only goes up by 50% to 1/2 MMPQ2907A + 1 resistor.

author: David Hess
author_rank: Super Contributor
timestamp: May 06, 2018, 09:41:53 pm
content: There are all kinds of ways to do a current pull-up especially if the output does not need to go all the way to the positive supply. A single PNP transistor and resistor can do it if you have an auxiliary supply higher than the logic supply.I wonder how well a JFET with shorted gate and source would work. But even a cheap J113 JFET is more expensive than a bipolar transistor and a couple of resistors.

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2018, 11:31:01 am
content: Quote from: Ian.M on May 05, 2018, 10:48:09 pmThe trouble with that schematic is it uses non-standard symbols.Here's a version which should work on all LTSpice installs.Sorry it took so long by the way.

author: Ian.M
author_rank: Super Contributor
timestamp: May 15, 2018, 12:51:31 pm
content: Sorry I forgot to check if all symbols were in the standard install.swSPST is only being used as a symbol for a time dependent resistor - you could have just pasted in EuropeanResistor.asy from Misc and set its value to the R= expression on the GIF. Alternatively, save this as swSPST.asy:Code:Version 4SymbolType CELLLINE Normal -15 0 -33 0LINE Normal 1 -15 -15 0LINE Normal 15 0 0 0LINE Normal 31 0 15 0CIRCLE Normal 3 -13 -1 -17CIRCLE Normal 2 2 -2 -2PIN -32 0 NONE 8PINATTR PinName 1PINATTR SpiceOrder 1PIN 32 0 NONE 8PINATTR PinName 2PINATTR SpiceOrder 2

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2018, 02:00:58 pm
content: Quote from: Ian.M on May 15, 2018, 12:51:31 pmI didn't know about that.Yes, the ordinary European resistor symbol can be used. To avoid confusion I drew a switch symbol inside the box.

author: Ian.M
author_rank: Super Contributor
timestamp: May 15, 2018, 02:33:57 pm
content: Incidentally, there's a much simpler way to set up a source to control a current controlled switch (csw.asy) - simply set its internal resistance to -1 and short it, then use the current through is as the control for the switch. +1V source voltage gives +1A through it, so you can simply use 0V for open and 1V for closed without needing a negative threshold voltage.I see you already know the trick of swapping Ron and Roff to get the opposite switch action - that's very useful if you are modelling a two way switch.A while back, I took examples\Educational\Vswitch.asc and modified it to use a current controlled switch with a shorted negative resistance source controlling it, as a reminder of how to easily set it up.

author: Zero999
author_rank: Super Contributor
timestamp: May 15, 2018, 11:01:37 pm
content: Quote from: Ian.M on May 15, 2018, 02:33:57 pmI did use a shorted voltage source, with a positive resistance, at one point, but it offended my OCD sensibilities seeing a voltage with a short across it. I think you're right though: it's less messy to use a shorted voltage source, rather than all those external resistors. Next time I'll ignore the OCD side of me.