6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun May 19, 2024 1:00 pm

All times are UTC




Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Sat Feb 26, 2022 10:54 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8190
Location: Midwestern USA
akohlbecker wrote:
Unfortunately, the 65C816 requires an AC chip for at least the bank address latching as well as the associated logic, as the timing margin is pretty thin (10ns to latch after rising edge of clock).

74AHC logic will work as well in the latch application, as it typically has the prop times of 74AC but with less-aggressive outputs.

Quote:
For the RAM, go with a slow, 55ns one before attempting to increase the speed.

Why? The RAM's speed has nothing to do with circuit performance, unless the RAM is too slow. With most SRAM, output transition rate has little relation to the speed rating.

Incidentally, most contemporary SRAM has TTL-level outputs, not CMOS. If you use a bus transceiver in your 816 circuit it should be 74ACT or 74AHCT to act as a “level converter” (74HCT is not recommended due to its prop time).

74AHC logic is manageable on a two-layer PCB or a wire-wrapped unit, assuming good construction techniques.

Quote:
Having VDA, VPA be a part of the address decoding works but I would argue it is better to incorporate it into the read-write pulses.

No sir!

VDA and/or VPA is/are asserted midway during Ø2 low. At that time, the 816 will drive the data bus with the bank bits. Just how would using either/both of those signals to qualify read/write be helpful?

Asserting /RD during Ø2 low will cause severe data bus contention, making the system unstable at best, and DOA at worst. Asserting /WD during Ø2 low will create an opportunity for a wild write due to insufficient address bus setup time. During a write cycle, RWB goes low (according to the timing diagram) when VDA and/or VPA is/are asserted. However, that doesn't mean the rest of the hardware has “settled” following address bus setup. Also, asserting /WD before the rise of the clock means you are momentarily writing the bank bits to the addressed device, which is probably not a good idea.

Either reading and writing must be qualified with Ø2 or in lieu of such qualification, a bus transceiver must be used to isolate RAM, ROM and I/O hardware from the data bus whilst Ø2 is low. The “ideal” configuration is qualification with Ø2, along with a bus transceiver to deal with a small window of opportunity for contention to occur as the 816 “turns around” the data bus during a read cycle.

Caveat: nothing going to 65xx peripherals, e.g., 65C22, should be qualified by Ø2. Those devices “understand” the 65xx bus cycle and won't try to read or write during Ø2 low. In an 816 system, use of (as a minimum) VDA to qualify addresses to 65xx silicon is sufficient to avoid timing contretemps. Absolutely do not qualify addresses with Ø2. You’ll be disappointed with the results. :D

Attachment:
File comment: Fully-Qualified Read/Write Circuit — can also be done with 74AHC logic
read_write_qualify_alt.gif
read_write_qualify_alt.gif [ 46.98 KiB | Viewed 850 times ]

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 26, 2022 11:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8190
Location: Midwestern USA
Almost forgot! Here’s the circuit for my POC V1.3 design, which is all discrete logic and runs at 16 MHz. You might find something useful in it.

Attachment:
File comment: POC V1.3 Schematic
pocv130.pdf [344.54 KiB]
Downloaded 43 times

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 26, 2022 11:13 pm 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
BigDumbDinosaur wrote:
Like Garth, I cannot view that page. You can attach schematics, pictures, etc., to your posts here and save readers the trouble of having to go off-site.

Hmmm.... not sure why the site isn't pulling up for people. Maybe the images are too large. I will attach images moving forward. I'll update the external post also so that I have a consolidated view of changes and current state.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 26, 2022 11:18 pm 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
BigDumbDinosaur wrote:
Ah! A schematic that is actually a schematic and, especially important to me, is not in color.

74AHC is a good choice, as it combines the speed of 74AC with the more “gentle” outputs of 74HC. I've used 74AC/ACT in all my designs to date without noise problems, but these are on four-layer boards with internal ground and power planes, and meticulous attention to layout details. 74AC/ACT on a two-layer board may be a pretty unforgiving arrangement due to ground bounce, ringing, etc.

Noted... color... bad. :)

Unfortunately, for now, I'm just using a two-layer board, as EasyEDA is completely busted when trying to use inner planes. It's supposed to be fixed in an upcoming release.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 26, 2022 11:20 pm 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
BigDumbDinosaur wrote:
Here’s the circuit for my POC V1.3 design, which is all discrete logic and runs at 16 MHz. You might find something useful in it.

Awesome! Thank you!


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 26, 2022 11:56 pm 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
akohlbecker wrote:
Having as less as possible AC/ACT chips on a breadboard is the way to go. On a PCB I would say it is fine if you have proper signal return paths / ground planes. Can you share screenshots of your PCB routing?

For the RAM, go with a slow, 55ns one before attempting to increase the speed. This goes for all the components, if they don't have a reason to be fast, go with slow chips, as they will be easier to manage for a start. Once you have a working slow build, then you can try to increase speed.

Your GAL can also be an issue with fast edges. Which model are you using? Can you also share how you're programming it and with which equations?

I am a neophyte when it comes to PCB design (well... almost all of this stuff), so please be gentle. :) Attached. This is only a two-layer board, as EasyEDA has a current bug that prevents inner planes. :( The board is intended for experimenting. You'll see locations for logic chips that only have power and ground connected. I'm then using pin headers to connect different configurations as I experiment. After I get something basic working, I'll spin a four-layer board with inner VCC and GND and cut down to the actual circuit I intend to use moving forward.

For RAM, I have some slower AS6C4008 on hand. I can give it a shot. I will also switch back over to HC chips, based on feedback here. Also, the W65C816SXB (rev. C) is all HC chips. I'm good with starting with a slower build and once it's running, try to speed things up.

For the GAL, I am using a GAL22V10D-15LP. Config attached. I also have some GAL22V10D-10LP and GAL22V10D-7LJ. I'm happy to replace with simple gates, if the GAL looks to be a problem. In an earlier version (where I actually got it to work), I was using an FPGA for the decode logic. I have also tried decode logic from a flash ROM, and I have tried driving directly off of A15 and A15#.


Attachments:
File comment: GAL config
GAL.png
GAL.png [ 109.23 KiB | Viewed 847 times ]
File comment: PCB bottom
pcb bottom.png
pcb bottom.png [ 665.13 KiB | Viewed 847 times ]
File comment: PCB top
pcb top.png
pcb top.png [ 468.9 KiB | Viewed 847 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 1:38 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
I see the problem. The ground and VCC are narrow 10mil? traces. That definitely won't work with fast edge rate components. You'll need to identify all the ground and VCC and add multiple wires (small 30 gauge wirewrap wires are OK) to form a grid. Ground wire grid is more important than VCC grid. In fact, add a few wires, test and observe how things change; add more and test. You'll be amazed how important grounds are.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 1:49 am 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
plasmo wrote:
I see the problem. The ground and VCC are narrow 10mil? traces. That definitely won't work with fast edge rate components. You'll need to identify all the ground and VCC and add multiple wires (small 30 gauge wirewrap wires are OK) to form a grid. Ground wire grid is more important than VCC grid. In fact, add a few wires, test and observe how things change; add more and test. You'll be amazed how important grounds are.
Bill

Would inner GND and VCC planes have been sufficient, or should I also increase the size of all VCC and GND traces in future PCB designs?


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 1:52 am 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
plasmo wrote:
I see the problem. The ground and VCC are narrow 10mil? traces. That definitely won't work with fast edge rate components. You'll need to identify all the ground and VCC and add multiple wires (small 30 gauge wirewrap wires are OK) to form a grid. Ground wire grid is more important than VCC grid. In fact, add a few wires, test and observe how things change; add more and test. You'll be amazed how important grounds are.
Bill

I checked the design quickly. Traces are 0.254mm (10mil).


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 1:58 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8440
Location: Southern California
plasmo wrote:
I see the problem. The ground and VCC are narrow 10mil? traces. That definitely won't work with fast edge rate components. You'll need to identify all the ground and VCC and add multiple wires (small 30 gauge wirewrap wires are OK) to form a grid. Ground wire grid is more important than VCC grid. In fact, add a few wires, test and observe how things change; add more and test. You'll be amazed how important grounds are.

Grid, yes. Definitely. The finer, the better. Trace width for ground and Vcc connections makes almost no difference though. See viewtopic.php?p=90824#p90824 .

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 2:15 am 
Offline

Joined: Sat Feb 19, 2022 2:18 am
Posts: 47
GARTHWILSON wrote:
Grid, yes. Definitely. The finer, the better. Trace width for ground and Vcc connections makes almost no difference though. See viewtopic.php?p=90824#p90824 .

Lesson learned... always have inner GND and VCC planes. I'll get my bodge wire out tomorrow and start soldering!


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 2:36 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8440
Location: Southern California
rehsd wrote:
GARTHWILSON wrote:
Grid, yes. Definitely. The finer, the better. Trace width for ground and Vcc connections makes almost no difference though. See viewtopic.php?p=90824#p90824 .

Lesson learned... always have inner GND and VCC planes. I'll get my bodge wire out tomorrow and start soldering!

I've seen a couple of good instructional videos I need to find again to give links to, because even Vcc planes are often done wrong. However, I'm confident that with a fine ground grid and fine Vcc grid, you'll do fine in 65 work. :D It's not like we're dealing with 50ps rise times here.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 3:20 am 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1076
Location: Albuquerque NM USA
rehsd wrote:
GARTHWILSON wrote:
Grid, yes. Definitely. The finer, the better. Trace width for ground and Vcc connections makes almost no difference though. See viewtopic.php?p=90824#p90824 .

Lesson learned... always have inner GND and VCC planes. I'll get my bodge wire out tomorrow and start soldering!

GND and VCC planes are not necessary. Your board is fairly big, so 4-layer board may be significantly more expensive. Don't need to add many ground or VCC wires to see significant differences. My guess is 3 or 4 ground and VCC wires are all you need to make it work; it may not have the desirable noise margin, but at least it'll work.
Bill


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 7:56 am 
Offline
User avatar

Joined: Sat Jul 24, 2021 1:37 pm
Posts: 282
GARTHWILSON wrote:
akohlbecker wrote:
Unfortunately, the 65C816 requires an AC chip for at least the bank address latching as well as the associated logic, as the timing margin is pretty thin (10ns to latch after rising edge of clock).

The 74HC573's required input data hold time is guaranteed to be no more than 5ns, and 2ns is typical. My 74AC data book is not clear on this, but it appears to be saying that the data input could even start to change up to a whole nanosecond before the latch enable, and it would still keep the right value at the output.


We must be looking at a different datasheet. TI's one here https://www.ti.com/lit/ds/symlink/cd74hc573.pdf specifies 10ns for the hold time over temperature at 5V. It could work if your LE signal is directly taken from a clock flip-flop and you have no additional logic for it (ie you don't use RDY)

GARTHWILSON wrote:
Quote:
For the RAM, go with a slow, 55ns one before attempting to increase the speed.

I think what we're talking about here is output edge rate, rather than access time. They're two separate things. Without looking through a lot of data sheets again, I don't remember ever seeing the output edge rates specified on SRAMs. Have you?


BigDumbDinosaur wrote:
Why? The RAM's speed has nothing to do with circuit performance, unless the RAM is too slow. With most SRAM, output transition rate has little relation to the speed rating.


I guess I made a shortcut here, to me an 62256 that goes to max 55ns must be of an older generation and thus have slower edges than the 71256SA that goes to 12ns, but you're right it is not technically specified.

BigDumbDinosaur wrote:
No pullup resistor is required on RWB, as that output is driven in both directions—it's not an open-collector output.[/color]


It is useful if you use Bus Enable as this pin is tri-stated, but not required.

BigDumbDinosaur wrote:
Quote:
Having VDA, VPA be a part of the address decoding works but I would argue it is better to incorporate it into the read-write pulses.

No sir!

VDA and/or VPA is/are asserted midway during Ø2 low. At that time, the 816 will drive the data bus with the bank bits. Just how would using either/both of those signals to qualify read/write be helpful?

Asserting /RD during Ø2 low will cause severe data bus contention, making the system unstable at best, and DOA at worst. Asserting /WD during Ø2 low will create an opportunity for a wild write due to insufficient address bus setup time. During a write cycle, RWB goes low (according to the timing diagram) when VDA and/or VPA is/are asserted. However, that doesn't mean the rest of the hardware has “settled” following address bus setup. Also, asserting /WD before the rise of the clock means you are momentarily writing the bank bits to the addressed device, which is probably not a good idea.

Either reading and writing must be qualified with Ø2 or in lieu of such qualification, a bus transceiver must be used to isolate RAM, ROM and I/O hardware from the data bus whilst Ø2 is low. The “ideal” configuration is qualification with Ø2, along with a bus transceiver to deal with a small window of opportunity for contention to occur as the 816 “turns around” the data bus during a read cycle.

Caveat: nothing going to 65xx peripherals, e.g., 65C22, should be qualified by Ø2. Those devices “understand” the 65xx bus cycle and won't try to read or write during Ø2 low. In an 816 system, use of (as a minimum) VDA to qualify addresses to 65xx silicon is sufficient to avoid timing contretemps. Absolutely do not qualify addresses with Ø2. You’ll be disappointed with the results. :D


Never said anything about not qualifying them with the clock also :-) Here is my circuit simulation for read/write pulses (with VA here being VDA OR VPA).

Attachment:
Screenshot 2022-02-27 at 08.39.03.png
Screenshot 2022-02-27 at 08.39.03.png [ 432.58 KiB | Viewed 822 times ]

_________________
BB816 Computer YouTube series


Top
 Profile  
Reply with quote  
PostPosted: Sun Feb 27, 2022 8:55 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8440
Location: Southern California
akohlbecker wrote:
GARTHWILSON wrote:
akohlbecker wrote:
Unfortunately, the 65C816 requires an AC chip for at least the bank address latching as well as the associated logic, as the timing margin is pretty thin (10ns to latch after rising edge of clock).

The 74HC573's required input data hold time is guaranteed to be no more than 5ns, and 2ns is typical. My 74AC data book is not clear on this, but it appears to be saying that the data input could even start to change up to a whole nanosecond before the latch enable, and it would still keep the right value at the output.

We must be looking at a different datasheet. TI's one here https://www.ti.com/lit/ds/symlink/cd74hc573.pdf specifies 10ns for the hold time over temperature at 5V. It could work if your LE signal is directly taken from a clock flip-flop and you have no additional logic for it (ie you don't use RDY)

Now that is interesting, since I was looking in my National Semi data books, and TI took over National. WDC's data sheet says 10ns min for tBH and 30ns max for tMDS, but there's no min on tMDS to get an idea of how long the bus might be in transition or floating. If it's left not driven for a short time after tBH, bus capacitance will hold the bank address byte plenty long, so there's no danger.

But shucks. There shouldn't be that much difference between manufacturers. I had a situation at work a dozen years ago with the lowly LM324 quad op amp where TI's would oscillate in our circuit while the power was coming up, at ten times the gain-bandwidth product (which should be impossible) and cause problems, so I had to specify that that part could not come from TI. Everyone else's was fine. (Note that data sheets' specs are always for steady-state power.)


Quote:
BigDumbDinosaur wrote:
No pullup resistor is required on RWB, as that output is driven in both directions—it's not an open-collector output.[/color]

It is useful if you use Bus Enable as this pin is tri-stated, but not required.

If it's tri-stated, wouldn't it be so something else can drive it? I keep looking over the topic, thinking there's something I'm missing; but in rehsd's schematic, BE's only connection is a pull-up. Otherwise, how fast do you want it? Pull-ups tend to not be useful at the higher 65xx speeds if you want fractional-cycle timing. Consider a line with 30pF total, including the ICs it's connected to, IC sockets, capacitance in the board, etc., and a pull-up of 10K which I'm seeing on plasmo's .pdf of rehsd's schematic. That makes for a time constant of 330ns. (Time constant is the length of time needed to achieve (1-1/e)*total_voltage_swing, or about 63% of the voltage swing. So for 5V CMOS it would be the time required to go from 0V to 3.16V.) You may need more logic to make sure its input swings as fast as you want it to.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 54 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: