Page 1 of 1

Would mix HC and LS be a problem?

Posted: Wed May 16, 2018 6:29 am
by Fisher
A while ago, I had a pirate cartridge with problems, wich I asked for help here.
The game died for good, so, I'm trying to rebuilt it.
It uses an 1Mbit ROM for the PRG and a 256Kbit ROM for the CHR.
Since I only could get a 2Mbit and a 512Kbit flashes I decided to turn this 4 in 1 on a 8 in 1.

It uses a 74LS74 as a flip flop to change games.
I'll need one more bit to do 8 games switch.
I could only found an 74HC74, would it work fine if I simply duplicate the circuit an cascate it or do I need to do some slight modification with the HC part?

Thanks in advance.

Re: Would mix HC and LS be a problem?

Posted: Wed May 16, 2018 9:32 am
by Memblers
It depends on how it's hooked up. You can use HC outputs on LS inputs, but not LS outputs on HC inputs. For that situation there is the HCT family, those are HC parts with TTL-level inputs. This site has a pretty good chart of the voltage levels.
http://www.interfacebus.com/voltage_threshold.html

Re: Would mix HC and LS be a problem?

Posted: Thu May 17, 2018 7:57 am
by Fisher
Thanks!
Probably I'll do some bigger modification on this circuit, maybe even change teh IC for one with more FFs.

I see there's some differences between the circuit I've been using and this one, but I need to fully trace the last one to correctly list them.

Re: Would mix HC and LS be a problem?

Posted: Sat May 19, 2018 6:47 am
by Fisher
To add the extra bit, first tried to switch to a 4520 and changing almost all connections without success.
Later, after crossing by some bad 74'74 ICs I finally got it working by duplicating the first block.
It's working like a charm!!

This is the circuit that was in the cartridge:
Cart
Cart
74LS74 Reset Cart.png (4.59 KiB) Viewed 20031 times
And this is the circuit I use when I build my multicarts:
Mine
Mine
74LS74 Reset Cart 2.png (4.07 KiB) Viewed 20031 times
Is anyone better than the other?

Re: Would mix HC and LS be a problem?

Posted: Sat May 19, 2018 10:33 am
by lidnariq
The former is "just" an asynchronous counter; the two outputs will count 0,1,2,3.
The latter is a twisted-ring counter; the two outputs will count 0,1,3,2.

They're both fine at this size. The former can scale arbitrarily—each extra latch doubles the number of states—but it's asynchronous: each latch adds more propagation time through the entire stack. The twisted-ring counter only adds two new states per extra latch, but is synchronous: all bits change (or fail to change) at the same time.

Re: Would mix HC and LS be a problem? [Solved]

Posted: Sat May 19, 2018 11:35 am
by Fisher
That's a very nice explanation. :)
Thank you!

Re: Would mix HC and LS be a problem?

Posted: Sat May 19, 2018 4:56 pm
by Fisher
Another slightly off-topic question:
I know I can do a flip-flop with transistors, but would it be possible to implement a single bit FF with them to use in this case?
If so, could you please suggest a schematic?
Thanks in advance.

Re: Would mix HC and LS be a problem?

Posted: Sat May 19, 2018 7:08 pm
by lidnariq
A simple flip-flop is usually 2 (S-R) to 6 (D) NAND gates; it'll take an awful lot of bare BJTs to make one.

Although there is this one ridiculous way of making a single bit of DRAM... he also mentions a classic 2-BJT S-R latch.

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 2:11 pm
by Fisher
That's pretty interesting. Thanks!
I particullary found this circuit to be doable to me.
Would I just plug the M2's diode + capacitor on it's clock input?

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 2:33 pm
by lidnariq
Er.... not really? M2 could be used as a DRAM refresh clock, but it would only hold its value while it's running. When reset is held, the clock stops, and the contents of the single bit of DRAM will be lost.

The circuit you linked to is an S-R latch, not a JK register. On its own, it can't do a useful thing in response to a clock input, so the reset-detection circuit isn't related.

Regardless, it's still so many passives that I can't imagine it's cheaper than something more nearly integrated.

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 3:04 pm
by Fisher
Maybe this one?
I know an IC should be a lot easier, but unfortunatelly I'm getting a shortage on the local stores.

I don't want to complain, but locally if I buy one it's R$ 40,00, almost the same price if I buy online, since shipping is around R$ 37,00 being (as of today) US$1,00 = R$3,74.
I sure could buy a bigger lot and share parts/costs with some neighboring people, but most of them have no idea of what an TTL gate is.
Or I could buy on Aliexpress, but it takes around 3 months to arrive if I'm lucky.
So what I had done is to search on junk piles, wich also have a low amount of discrete logic ICs, but lots of transistors and passive components.

Or maybe I should just drop my "repro" hobby and play what I want in emulators...
But I've learned a lot of electronics with this hobby (thanks to you and NESDev!) and want to keep learning if possible.

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 4:27 pm
by lidnariq
Are there any parts other than discretes that are affordable?

A lot of TTL 74xxx parts have the schematic of how they're made available as part of the datasheet. For example, I've attached a schematic from TI's datasheet for the SN74LS74A-
74ls74a-002.png
You could eliminate approximately half of the transistors here in order to convert this into a "T-type flip-flop", but it's still a huge number.

But it doesn't take very much complexity before the datasheets stop showing the schematic and instead just show a logic diagram:
SN7470--000.png
SN7470--000.png (9.07 KiB) Viewed 19906 times
. While it's certainly easy enough to convert a symbol back to a bunch of transistors, it doesn't speak well for the hope of manageable size.

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 5:18 pm
by Fisher
Thanks!
That's great info.

I'll need to search and try a bit more to see if I can find a balance between suitable and maneageable (or should I say constructible inside a cartridge?) circuit.
If I can find some interesting things, I'll post back here.
Looks like the solution should be to have ideas, save money and buy/harvest parts in bigger quantity.

By the way, what's that transistor with 2 emitters??

Re: Would mix HC and LS be a problem?

Posted: Mon May 21, 2018 5:29 pm
by lidnariq
Multiple-emitter transistors are weird.

You can fake them by stapling multiple BJTs together (all collectors common, all bases common, each emitter separate)