In BDD's NAND-gate diagram above, another way to connect the 3.3K resistor is across the Shottky diode (instead of to Vcc), so when the gate's output is low, the current is nearly zero, but it still does its pull-up job if the gate's output is high. If the processor pulls RDY low internally, it still won't be fighting the gate.
First steps...
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First steps...
Quote:
Might as well... if it doesn't work, it doesn't work- I just lower the clock speed until it does... and take it into consideration during "round 2".
In BDD's NAND-gate diagram above, another way to connect the 3.3K resistor is across the Shottky diode (instead of to Vcc), so when the gate's output is low, the current is nearly zero, but it still does its pull-up job if the gate's output is high. If the processor pulls RDY low internally, it still won't be fighting the gate.
Quote:
Provided I got a second/third pair of eyes to look over my schematic, would it be an exceptionally bad idea to just get the PCB made (two layer) and skip the wire-wrap portion? I could always make corrections to a two-layer PCB, and money's a bit tight for wire wrap parts.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
GARTHWILSON wrote:
cr1901 wrote:
Also, I seem to recall that there is a method to run the 816 bus off the PCB without sacrificing half the connections for ground wires... can anyone elaborate on how that might be done while preserving signal integrity?
SCSI-1986 (original ANSI standard) specified a maximum 8-bit ("narrow") bus speed of 5 MB/sec in synchronous mode or 3.5 MB./sec in asynchronous mode. The revised SCSI-2 standard of 1994 upped the synchronous bus speed to 10 MB/sec (known as "fast SCSI") and the 1996 addendum to SCSI-2 upped the synchronous bus speed to 20 MB/sec (known as "ultra SCSI"). The single-ended bus passes a byte on the fall of the relevant signals (it's an active low bus), so the effective frequency of the bus is the same as the transfer rate, e.g., 20 MB/sec is effectively 20 MHz. The 16 bit or "wide" version operates the same as the narrow version, but at 40 MB/sec, since a word is transferred per bus cycle instead of a byte.
Despite these speed improvements, the physical bus implementation remained unchanged. SCSI-1986 (and its progenitor, SASI) specified Thevenin bus termination, as well as detailed timings for deskew delay, bus settle delay, etc., since the bus is essentially a bunch of transmission lines bundled as a unit. Implied is that strong drivers must be used on each active signal (48ma is typical). Narrow SCSI uses a 50 pin connector and matching cable, with a characteristic impedance of 100 ohms. There are nine data lines (8 bits plus parity) and nine control lines. The pinout on the connector results in each active line on the cable being "surrounded" by a ground, which reduces crosstalk and mutual inductance effects to a minimum. Therefore, a minimum of 37 conductors is required to implement the narrow bus. The wide bus uses a 68 pin HD connector and matching cable, but has many of the characteristics of the narrow implementation.
Now, here's the kicker. Despite the speed at which the narrow bus can operate, the cable length can be considerable, up to 12 meters when running at fast SCSI speeds (10 MB/sec)! Even at ultra SCSI speeds, a cable length of 3 meters is allowed. So it's obvious that a correctly engineered bus can work over a distance.
In order to take the 65C816 buses off the board, you are going to be extending at least 26 lines: D0-D7, A0-A15, RWB and Ø2 (you might also need an interrupt line). So you will need N+1 grounds, where N is at least 26, for a total of N × 2 + 1 leads in your expansion bus cable.
The point to all this is if you are willing to properly design your expansion bus you can get acceptable performance. So be prepared to either do it right or not have it work. You will have to allocate sufficient leads in your ribbon cable to surround each active lead with a ground. You will have to terminate each active lead at each end of the bus. You will have to provide enough drive to overcome capacitive loading. And...you will have to keep the effects of signal skew in mind as you design your bus. It's not simple, but it is possible.
Food for thought.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
cr1901 wrote:
Provided I got a second/third pair of eyes to look over my schematic, would it be an exceptionally bad idea to just get the PCB made (two layer) and skip the wire-wrap portion? I could always make corrections to a two-layer PCB, and money's a bit tight for wire wrap parts.
Right now, I'm just using CAD software to develop the schematic- it could always be used as a guide to develop the wire-wrap circuit as well.
Right now, I'm just using CAD software to develop the schematic- it could always be used as a guide to develop the wire-wrap circuit as well.
I took these things into consideration when I was designing POC V1.0. In the end, I elected to start right off with a PCB instead of WW because worsening eyesight at the time was causing me to be concerned about making unseen wiring errors in a WW unit. With that decision made, I also decided to use a 4-layer board with internal ground and power planes, as I knew that the resulting layout would be denser and quieter than 2-layer. There wasn't enough of a cost difference between 2- and 4-layer for me to consider a 2-layer board. The POC V1.1 update version, as well as the SCSI host adapter, was also 4-layer and thanks to insight gleaned from the performance of V1.0, quieter and capable of operating faster than the first version.
Only you can decide which way to go. It depends on whether you are willing to trade money for a shorter build time and reduced likelihood of assembly errors. If you decide to go the PCB route, I do suggest you look at a 4-layer design. However, for your first design, WW should be more than satisfactory—plus a lot easier to fix if you find an error after the fact.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
GARTHWILSON wrote:
I have only used one of the inexpensive houses once though, which was PCB Express or Express PCB (I never can keep those two straight-- I used the one in Oregon which allows you to submit industry-standard gerber files, not the one in California which requires you to use their CAD)...
Either way, both source produce high quality boards. Express PCB's software is a form of vendor lock-in, of course, since their PCB CAD doesn't generate Gerbers. However, from a hobbyist's point of view, that may be unimportant.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: First steps...
Quote:
A ribbon cable can be made to work quite well IF correctly driven and terminated
Thanks
Ed
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First steps...
Quote:
There wasn't enough of a cost difference between 2- and 4-layer for me to consider a 2-layer board.
Quote:
However, for your first design, WW should be more than satisfactory—plus a lot easier to fix if you find an error after the fact.
Now about the SCSI rabbit trail: BDD, is there a Thevenin termination at each end of the long connection? That would take a drive current of 50mA per line (pulling both up and down) if the characteristic impedance of the transmission line is 100Ω (and the drivers' output voltages are close to 0V and 5V), but would make it quite well behaved. Also, what are the voltage thresholds of the inputs of the logic used?
The delay of a 12-meter-long cable would be somewhere around 60ns in one direction; so at 120ns for a round trip, it is of course not an option for sending out an address and receiving data on a 65-family bus in the same cycle at more than a few MHz max (the 120ns does not include memory-access time, time for glue logic, or set-up times) but SCSI is not used in the same way, so that doesn't bother it. If there's poor (or no) control of transmission-line impedance (like a hobbyist might have on a PC board) and it's not properly terminated, the rise times that are common in this hobby can become troublesome with connections anything over just a few inches long. Dr. Howard Johnson has a short article on the trouble caused by fast rise times where impedance is not controlled, at https://web.archive.org/web/20160409232 ... gswtch.htm, and another at https://web.archive.org/web/20120302190 ... kforit.htm. I've been bit by this myself (at work).
Card cages and large motherboards and memory SIMMs and so on, running at high speeds, definitely can be (and are) made; but the transmission-line math that goes into it, including things like the modeling of connectors, is way beyond the expertise of most hobbyists, so the easier thing (and my recommendation) is to just keep it small and make connections as short as possible, in order to avoid the complications. If you do this, you don't have to understand the hard stuff. I want to see success, and not have the beginner discouraged because he bit off more than he understands (although there have been times that I bit off more than I understood and happened to get lucky, and I didn't realize how lucky I was until years later).
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
GARTHWILSON wrote:
Now about the SCSI rabbit trail: BDD, is there a Thevenin termination at each end of the long connection? That would take a drive current of 50mA per line (pulling both up and down) if the characteristic impedance of the transmission line is 100Ω (and the drivers' output voltages are close to 0V and 5V), but would make it quite well behaved. Also, what are the voltage thresholds of the inputs of the logic used?
An alternative to Thevenin termination is active termination, in which a 3.3 volt regulated source is connected to each signal through a 100 ohm resistor, and no connection is made to ground. This is the preferred arrangement for all single-ended implementations, and is required with ultra SCSI (20 or 40 MB/sec). The regulator has to produce at least 900ma to handle the worst-case scenario of all 18 narrow bus signals being simultaneously active. Host adapters that implement the wide bus typically have two regulators.
Quote:
The delay of a 12-meter-long cable would be somewhere around 60ns in one direction; so at 120ns for a round trip, it is of course not an option for sending out an address and receiving data on a 65-family bus in the same cycle at more than a few MHz max...
Quote:
If there's poor (or no) control of transmission-line impedance (like a hobbyist might have on a PC board) and it's not properly terminated, the rise times that are common in this hobby can become troublesome with connections anything over just a few inches long. Dr. Howard Johnson has a short article on the trouble caused by fast rise times where impedance is not controlled, at http://www.sigcon.com/Pubs/straight/logswtch.htm, and another at http://www.sigcon.com/Pubs/edn/askforit.htm. I've been bit by this myself (at work).
Quote:
I want to see success, and not have the beginner discouraged because he bit off more than he understands (although there have been times that I bit off more than I understood and happened to get lucky).
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: First steps...
I didn't read all of the new posts yet, but let me set some concrete simple goals for "round 1" of this project:
Get a simple '816 board running at 14MHz.
Include an off-board bus to interface to an FPGA dev board (to develop the DMA controller).
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2. Round 2 is not going to be backwards-compatible most likely.
The reality is, I could start the DMA controller while I build this... hell, in theory I could just buy an 816 core from WDC and just use the FPGA for now... but where's the fun in that?
Get a simple '816 board running at 14MHz.
Include an off-board bus to interface to an FPGA dev board (to develop the DMA controller).
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2. Round 2 is not going to be backwards-compatible most likely.
The reality is, I could start the DMA controller while I build this... hell, in theory I could just buy an 816 core from WDC and just use the FPGA for now... but where's the fun in that?
Re: First steps...
BigEd wrote:
Quote:
A ribbon cable can be made to work quite well IF correctly driven and terminated
Thanks
Ed
Quote:
...but the transmission-line math that goes into it, including things like the modeling of connectors...
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: First steps...
cr1901 wrote:
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
cr1901 wrote:
I didn't read all of the new posts yet, but let me set some concrete simple goals for "round 1" of this project:
Get a simple '816 board running at 14MHz.
Include an off-board bus to interface to an FPGA dev board (to develop the DMA controller).
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2.
Get a simple '816 board running at 14MHz.
Include an off-board bus to interface to an FPGA dev board (to develop the DMA controller).
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2.
When an interrupt hits the 65C816 will automatically load $00 into PB after pushing it, PC and SR to the stack (which itself can only exist in bank $00 absent bank remapping logic). Therefore, you must have code and data (vectors) in bank $00 for the '816 to access. Otherwise, the '816 will load garbage for an interrupt vector and your machine will likely crash.
Yes, it is possible to have a short ISR preamble in bank $00 and then JML from there to another bank for the rest of the ISR. However, that is not efficient, especially since an ISR should be as succinct and fast as possible. Yes, JML only uses six cycles and it would only happen once per interrupt, but it's six cycles repeated as many times per second as interrupts occur, which could be a lot during I/O.
Similarly, when the '816 is reset, it reverts to emulation mode and forces bank $00. Therefore, code must be available in bank $00. There is no other way to initiate the reset procedure.
As for I/O hardware mapping, you have to consider that reads and writes with the '816 are always directed to the bank set in DB, unless long or indirect long addressing is used. Therefore, you must be prepared to either change DB on every interrupt and restore it before returning to the foreground process, or use 24 bit addressing on every I/O access. 24 bit addressing is slower than 16 bit addressing by one cycle, which really isn't something that you want in an ISR or an operating system kernel (a single I/O transaction could potentially involve several thousand device register accesses ). Also, a number of instructions are not available with 24 bit addressing, so you may find yourself using more code and clock cycles than really necessary.
For test purposes on a new design, having ROM and I/O in bank $00 assures access in emulation mode, which will simplify initial hardware debugging. You can always write a checkerboard routine that runs in bank $00 to test your bank logic after you have leaped the hurdle of getting the unit to work.
Don't make it complicated.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
BTW, be sure to read this article.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: First steps...
Point taken, 14MHz has to count as high tech! BTW I'm not sure if many projects (or any projects?) use RDY to produce long clock cycles to talk to slow peripherals. It seems like the right way to do it - think of it as wait states if you will. An alternative way is to build a fancy clock generation which swallows clock pulses for slow accesses.
It's possible that a long bus/highly extended machine would work at 14MHz with a single wait state - it would be faster than a 7MHz system, especially if it had some fast memory close to the CPU.
Cheers
Ed
It's possible that a long bus/highly extended machine would work at 14MHz with a single wait state - it would be faster than a 7MHz system, especially if it had some fast memory close to the CPU.
Cheers
Ed
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: First steps...
BigEd wrote:
Point taken, 14MHz has to count as high tech! BTW I'm not sure if many projects (or any projects?) use RDY to produce long clock cycles to talk to slow peripherals. It seems like the right way to do it - think of it as wait states if you will. An alternative way is to build a fancy clock generation which swallows clock pulses for slow accesses.
Quote:
It's possible that a long bus/highly extended machine would work at 14MHz with a single wait state - it would be faster than a 7MHz system, especially if it had some fast memory close to the CPU.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: First steps...
GARTHWILSON wrote:
cr1901 wrote:
Use a VIA and ACIA as basic I/O on the '816 board end... place the I/O, ROM, and RAM (if necessary- I can use the FPGA SRAM) in separate banks to test the bank circuit. I can worry about using the address space effectively later in round 2.
In any case I have some money now... So it's time to create a custom '816 board! IO map to follow tonight for critique