>>>>> "Ben" == Ben Stragnell writes: > Ok, I have to admit, if I'd paid more attention to Electronics, and > less attention to Programming, I probably wouldn't be asking these > questions... but... > Exactly what are the rules for combining 74LS, 74HCT, 74F etc... in > the same circuit? In the past, I've only built small circuits, and > it hasn't seemed to matter too much. However, I'm getting some > *very* strange behaviour from a PIC16C64 project, and I'm beginning > to suspect it's something to do with current, or perhaps > capacitance, or one of those quantities I know nothing about (spot > the programmer!). Get thee now to a bookstore and buy a copy of `The Art of Electronics' (Horowitz & Hill, Cambridge University Press, ISBN 0-521-37095-7). It's not cheap (Amazon lists it at $65), but at over a thousand pages, it's not surprising. This book is the closest I've seen to a primer for nearly all areas of electronics. On page 574 is a nice little table that lists what you can drive with what. I'll try to reproduce part of it here: (View this with a non-proportional font). TTL | HCT/ACT | HC/AC | 4000B/74C@5v | +------+---------+-------+--------------+ TTL | OK | OK | A | A | +------+---------+-------+--------------+ HCT/ACT | OK | OK | OK | OK | +------+---------+-------+--------------+ HC/AC | OK | OK | OK | OK | +------+---------+-------+--------------+ 4000B/74C | OK * | OK | OK | OK | @5v | | | | | +------+---------+-------+--------------+ The way you use this is pretty simple. Find the driving chip on the left, and the driven chip on the top. Where those meet, read the space. If it says OK, you'll be fine. If it says A, you need to use a pullup to 5V. The * indicates that you will only have limited fanout. This means that you should only connect one or two gates to the output, instead of the usual allowed ten or so. > The circuit is a PIC16C64 @ 20MHz. Pins A0-A2 to go S0-S2 on a > 74LS138N inverting demultiplexer. Pin A3 is the ENable on the > demux. The 8 outputs from the demux go to a bunch of different > peripherals (LCD, SRAM, etc... to control reading/writing etc...). Here, we have a CMOS chip sourcing, driving TTL loads. Generally, this is OK, but with limited fanout. Due to the very high current output capabilities of the PIC, I expect no problem here. > One of the demux outputs (03) goes to LE on a 74LS574N octal D-flip TTL driving TTL. No problem. > flop, as well as going through a 74F04 hex inverter, and then on to TTL-TTL again. > /EN on a 74HCT245N bus transceiver. Pins B0-B6, C0-C7, and D0-D7 go TTL-HCT. Should be no problem. > to all the peripherals. C0-C7 go to the flip-flop, and D0-D7 go to > the bus transceiver. Basically, I use A0-A2 as a device select, and > A3 as an "enable", for reading/writing to SRAM, IDE interface, and > the flip-flop/transceiver which are hooked up to a PC parallel port. > Most of the time it works just fine. However, when communicating > with the PC, if I hold a logic probe on the demux O3 output, I start > getting comms errors. I've checked all the connections, and they > look good... This leads me to suspect that the logic probe is loading the TTL driving it enough to be a problem. TTL is good at sinking, but not sourcing current. I'd stick a 4.7k or so pullup on the output of the 7404 and see if that helps. Also, you might be overloading the '245. It's not too likely, but possible. What kinds of loads are hanging off of it? Also, if you have a scope or can borrow one, it could be useful; just probe around the circuit looking for edges that aren't very sharp. > I'm tearing my hair out on this one!!! Any help would be GRATEFULLY > received. Hopefully this will be of some use to you, or someone else. > Cheers, Ben -Ansel -- It's all fun and games until someone loses an eye. -Sergei We can't quit. If we quit now they'll kill us. -Lab tech #2 Pardon my writing; I'm using voice-recognition, and I sometimes don't catch all the errors.