Would mix HC and LS be a problem?

A place that you can discuss reproduction of classic titles or "licensed-for-reproduction" homebrew for personal use.

Moderators: B00daW, Moderators

Forum rules
1. NO BLATANT PIRACY. This includes reproducing homebrew less than 10 years old, with the exception of free software.
2. No advertising your reproductions, with the exception of free software.
3. Be nice. See RFC 1855 if you aren't sure what this means.
Post Reply
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Would mix HC and LS be a problem?

Post 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.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Would mix HC and LS be a problem?

Post 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
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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 20002 times
And this is the circuit I use when I build my multicarts:
Mine
Mine
74LS74 Reset Cart 2.png (4.07 KiB) Viewed 20002 times
Is anyone better than the other?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Would mix HC and LS be a problem?

Post 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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

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

Post by Fisher »

That's a very nice explanation. :)
Thank you!
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Would mix HC and LS be a problem?

Post 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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Would mix HC and LS be a problem?

Post 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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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.
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Would mix HC and LS be a problem?

Post 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 19877 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.
User avatar
Fisher
Posts: 1249
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: Would mix HC and LS be a problem?

Post 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??
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: Would mix HC and LS be a problem?

Post 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)
Post Reply