Author Topic: Counters for address bus - do I need latches?  (Read 2936 times)

0 Members and 1 Guest are viewing this topic.

Offline zappedyTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: 00
Counters for address bus - do I need latches?
« on: May 17, 2015, 11:18:55 am »
I want to read arbitrarily sized parallel memory chips (ROM) via a bidirectional PC parallel port (PP). Don't ask why that platform...). Lots of experience with assembly programming, no experience with glue logic or hardware.

So, I was going to connect a bunch of 74590's in cascade and clock them with a single PP pin. The outputs of the 74590s then go to the address pins of the ROM and the data lines from the ROM goes back to the input pins of PP. So, very basic. I simulated my circuit and it looks like it works.

However, the 74590's only have a ripple carry. From what I understand, this means that every 74590 will change slightly later then the previous. Does this mean I will need additional clocked latch chips after each 74590?

Can I use the Register Clock on the 74590's to somehow make the address bus change synchronously? I don't really understand what it does.

Do I even have to do this synchronously, or could I even use a plain ripple counter to drive the address bus without problems, assuming I use the proper timing delays in the software?
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5125
  • Country: nl
Re: Counters for address bus - do I need latches?
« Reply #1 on: May 17, 2015, 11:33:47 am »
As long as you wait long enough to stabilize the address before reading the data it should work ok. You can even use dip switches to select an address.
Keyboard error: Press F1 to continue.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Counters for address bus - do I need latches?
« Reply #2 on: May 17, 2015, 11:37:22 am »
Ripple counter is fine, just do the read of the data well after the last counter has changed state. Minimum is the sum of all the delays of the riple counters ( 16 times in your case with a 64K chip), plus the decode time of the ROM chip, then add a few ns extra to settle on the data bus then read. If you use 1ms as a read rate then you likely will have no problems, read the data just before you do the next clock.
 

Offline zappedyTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: 00
Re: Counters for address bus - do I need latches?
« Reply #3 on: May 17, 2015, 12:53:00 pm »
Thanks guys! I will try your suggestion and use ripple counters because I already have a bunch of those in my parts drawer. No need for speed so it will probably work!
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Counters for address bus - do I need latches?
« Reply #4 on: May 17, 2015, 05:29:06 pm »
I made one of those a long time ago, I used a few latches to store the desired address, no counter.

http://webpages.charter.net/dawill/tmoranwms/Elec_RamR.html

Unidirectional port at that, so the data byte was read a nibble at a time via status signals.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline zappedyTopic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: 00
Re: Counters for address bus - do I need latches?
« Reply #5 on: May 19, 2015, 02:30:39 pm »
Thanks, I'll keep that design in mind!

Since I'm waiting for components to arrive by mail, I read some more.

Do I really need protection circuitry for the parallel port, and if so, what?

I read about shorts to ground when devices are unplugged and so on. I would not like to zap the motherboard of my old laptop that still has a working 5V parallel port!

Some sites mentioned the 74LVC245 buffers, and it's 16-bit counterpart, but getting those with breakout boards for DIP will be expensive, and will require another month or so waiting on them to arrive...

Perhaps this is all unnecessary?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Counters for address bus - do I need latches?
« Reply #6 on: May 20, 2015, 01:14:52 am »
"Meh" comes to mind?...

Dunno.  I don't really know what is typical for use on computers.  Think the last motherboard I had with a parallel port, there was a 74LV244 nearby, which seems suggestive.  Others, it's hard to tell if they just go right up to the system chip, or what...

If you're careful, taking ESD precautions and all that, it shouldn't be any problem.  Also, keep the baud rate moderate to low (i.e., less than MB/s) to minimize the effects of reflections, especially on long cables (>3ft?).

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Asmyldof

  • Regular Contributor
  • *
  • Posts: 148
  • Country: nl
  • Freelancer - Persnicketist - Do'er of stuff
    • Asmyldof's Home. It's old, not quite impressive, but it's there.
Re: Counters for address bus - do I need latches?
« Reply #7 on: May 20, 2015, 01:57:58 am »
Meh seems about right.

Plug/unplug is not going to destroy anything if you hook up the signals right and use a factory standard Sub-D connector using only logic and ROM that's all powered from a low-power supply or the connector itself.
There's designs out there that are powered by the port itself by means of a set of 1n4148 diodes on all signals and a nominal series resistance that don't require ultra quick data flanks that worked for those people.
Caveat: No CE/TuV will ever approve that, because it CAN destroy the buffers or control logic. Most computers have buffers.

If you want to be 100% safe you can apply some modern connector trickery by heating the GND pins and pushing them out a little bit, so that they all connect first and disconnect last, but this is more work with basically no real-world need.

What you DO have to be very careful of is boot-up. During boot BIOS and/or OS kernel may send control signals on the bidirectionals and control signals to check if a terminal printer or terminal display is there, to output logs or statistics to. So if you have outputs on your side on a bidirectional and the PC then wants to output the opposite voltage, that conflict may end in burn-outs on your motherboard. In another case the ROM might coincidentally "respond" in one certain way, making the system going into Kernel-dump sending out bunches of data on the signal lines on EPP type ports, where your ROM is also outputting something.
Although that is also not very likely, it is more a consideration than the plug-risk in my experience. So while booting the safest thing is to not have anything attached, and plug it in after you have a familiar screen (login or near-login, etc).
If it's a puzzle, I want to solve it.
If it's a problem, I need to solve it.
If it's an equation... mjeh, I've got Matlab
...
...
(not really though, Matlab annoys me).
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf