New SCSI Host Adaptor

discuss both original and modern hardware for the bbc micro/electron
User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sat Jun 13, 2020 11:09 am

Just following up on my commitment / responsibility to make this project open source. My preference would be to publish on Github, but I'm very much a Github novice, so please bare with me. I'm using Git Gui on Windows.

As a start, I've forked the entire BeebSCSI project from simoninns/BeebSCSI. I''m only using a subset of that project, so is that the correct thing to do?

Assuming it is, I've then cloned the project using Git Gui, and it appears to have made a local copy on my hdd.

I've then created a branch using Git Bash as follows:

Code: Select all

git checkout -b BeebSCSIHostAdaptor
I can switch between (checkout) the Master and BeebSCSIHostAdaptor branches using Git Gui but I'm not seeing any files in the Unstaged Changes section for either branch, so I guess I'm doing something wrong?

Sorry for the dumb questions!

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Thu Jun 18, 2020 7:49 am

It really depends on what you want to do. You can fork a repo (like BeebSCSI) then branch it; that way if the underlying repo changes you can merge it with you branch. You can have a forked repo as part of your main repo to... so you treat BeebSCSI like a library 'under' your own code. Generally, if you make a repo and then clone another repo into a sub-folder, git will sort-of ignore the sub-repo (so any user compiling from source will need to clone the sub-repo too as part of making the build environment). Git is flexible, git is confusing :D

Another way is to fork the base project (BeebSCSI) and just have at it; treating your master as you currently do your branch. You can always resync the fork with the original BeebSCSI repo (it's really the same as using a branch if you think about it). This makes the fork 'your own' but, if you are intending to resync often, can be a little more unclear imho.

There are other ways too but it's difficult to say what's best for you (and there really isn't a 'right' way - just different ways :) ). It's worth learning git though, so my recommendation would be to order a book like "Version Control with Git" (O’Reilly) or similar as they have good well laid-out examples.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Mon Sep 14, 2020 9:04 pm

Folks - apologies for digging up an old thread here, but just looking for a bit of quick advice from those with more experience in this.

Without having to read through the whole thread, it was earlier recommended that I add some buffering between the XC95xxxXL CPLD and the SCSI drive I am trying to interface with. Given the CPLD is a 3.3v device (with 5v tolerant inputs) and the drive is a 5v device, I've been looking at a couple of solutions. I'm curious to know what the best solution would be.

Firstly, I was considering using a 74LCV245 device, which is a 3.3v device that can tolerate 5v inputs, and have the level shifting done between the LCV245 and the drive, but then I thought it might be better going for a 74HCT245 device that is a 5v device, and have the level shifting done between the CPLD and the HCT245.

Is there a recommended way to do this, or does it not really matter?

Thanks

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 4:23 pm

Ok, so buffering is not quite as straight forward as I had initially anticipated. The problem I have is that the 8 bit SCSI data bus is bi-directional, and is open collector. Referring back to this schematic for the original host adaptor design:

https://www.domesday86.com/wp-content/u ... dapter.gif

With my BeebSCSI implementation, there are 8 pins on the CPLD assigned to the SCSI drive data bus, and logic within the CPLD reads input, writes output (open collector), and drives the bus open collector when idle. I can't find any simple way to buffer this externally.

1. Writing data from CPLD -> SCSI Drive
The original host adaptor uses a pair of 74xx38N open collector NAND gate ICs to both drive and isolate the databus. One input to the NAND gate is one of the eight data bits from 1MHz bus (via some latches), and the other input (common to all 8 data bits) is the SCSI drive I/O status and is used to isolate the bus (or enable it to be driven).

I need to do something similar with my BeebSCSI implementation. Unfortunately, this part seems to be obsolete, but I have found a newer SN74HCS03 that looks to be compatible. The trouble is this part isn't available from JLCPCB, so I'd need to solder the thing on myself. I'm trying to avoid that as much as I can. I guess the alternative would be to to use a more conventional NAND gate (74xx00), and open drain buffer (74xx07), but that's adding extra components that I would rather avoid.

2. Writing data from SCSI Drive -> CPLD
I think this is more straight forward. Here, all I need to do is add a 74xx244 (or 245), and put this in parallel with the devices above. The OE would be driven again by the SCSI drive I/O status (inverse of above). In this case, the individual bits wouldn't need to be open-drain as they're just feeding into the CPLD


One other option I was considering was to separate out the SCSI inputs and SCSI outputs at the CPLD I/O. If I do that, I don't need the NAND gates for part 1 above. That would be done in the CPLD. All I would need is a more simple open drain buffer which is available from JLCPCB.

This all seems to be a bit complicated, so I just want to check that I'm not over thinking things here.

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Wed Sep 16, 2020 4:29 pm

I could be miles off (working from memory) - but the 74245 is an 8-bit bi-directional buffer with open-drain iirc... it should have a direction pin and a !OE pin - if you disable the outputs they should float... so with 2 control pins from the CPLD (on for direction and one for output enable) you should be able to externally buffer in any way you like?

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 4:36 pm

simoni wrote:
Wed Sep 16, 2020 4:29 pm
I could be miles off (working from memory) - but the 74245 is an 8-bit bi-directional buffer with open-drain iirc... it should have a direction pin and a !OE pin - if you disable the outputs they should float... so with 2 control pins from the CPLD (on for direction and one for output enable) you should be able to externally buffer in any way you like?
The 245 is 3 state. I can disable all 8 outputs together with the /OE, but from what I understand, there's no way to disable individual bits and allow them to individually float, which (I believe) I need to do.

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Wed Sep 16, 2020 5:25 pm

Which SCSI signal do you consider needs individual control? I don't recall any; pretty much all the SCSI pins should be terminated via pull up/down resistors (so can't by definition be floating).

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 6:31 pm

simoni wrote:
Wed Sep 16, 2020 5:25 pm
Which SCSI signal do you consider needs individual control? I don't recall any; pretty much all the SCSI pins should be terminated via pull up/down resistors (so can't by definition be floating).
I was thinking of the SCSI data bus; DB0..7 on the original host adaptor schematic. You're absolutely right about the fact that they're terminated.

The original host adaptor schematic shows that each data bit is driven by an open collector NAND gate. When the data bus is active, the two voltage levels on the data bus are either 3v (set by the terminator bias resistors) or 0v. When the data bus is inactive, the data bus will still sit at a quiescent 3v level.

If I use a 245, then the two voltage levels on the data bus will be either 5v or 0v when the data bus is active, and will sit at a quiescent 3v level when inactive.

If it's ok to actively drive the data bus to 5v during operation instead of 3v, then that would make things so much simpler. I did try this yesterday, but it wasn't working. However, that may be down to me not using the correct logic for OE & DIR on my 245.

Thanks for your help.

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Wed Sep 16, 2020 8:01 pm

The pull up/down configuration serves a couple of purposes; as well as terminating they have the effect of pulling the lines up to 5Vs when the cable is disconnected (which is why the values aren't symmetrical) - the SCSI bus is inverted logic, so all 1's is everything 'off'.

So on the 5V SCSI bus the signals should always be 0V or 5V; rather than 3V. If you have an output which is either driven or open and then connected to an asymmetric pull up/down resistor pair (connected between 0V and 5Vs) the output would always be 0V or 5V.

So, if you look again at the original Acorn schematic, you will see that either IC13/14 is enabled (the adapter is driving the databus, and all IC14 outputs are pulled to 0V or 5V by the terminating resistors) - or IC14 is disabled and IC3 is acting as an input buffer - in which case the far-end device is driving the databus, but it's still being pulled up/down to 5V or 0V by resistor network.

If the above doesn't make sense; just say so and I'll try to draw something to illustrate the databus stage of the Acorn adapter.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 8:18 pm

I'm clearly getting confused! I assumed that when neither end is driving the bus that the terminating resistors would act as a potential divider, which is where I got the 3v from (5v x 330 / (330+220)).

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Wed Sep 16, 2020 8:37 pm

I'm clearly getting confused! I assumed that when neither end is driving the bus that the terminating resistors would act as a potential divider, which is where I got the 3v from (5v x 330 / (330+220)).
Actually, I think you're right there; but it would only float at 3Vs with the cable disconnected... in operation all the lines would be driven or sinking keeping everything to 0V or 5Vs. Either the device or the host is always in control of the bus; the I/O line is bistate, not tristate (so there is no 'floating' state during operation).

The 3Vs would be over the swing point of IC14, so a disconnected cable would be all 1's on the input to the host (which, due to SCSI's inverted logic, is all zeros).

Sorry for confusing you :) You are right apart from the assumption that there is a state where neither the host or device are driving the lines.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 8:53 pm

simoni wrote:
Wed Sep 16, 2020 8:37 pm
in operation all the lines would be driven or sinking keeping everything to 0V or 5Vs. Either the device or the host is always in control of the bus; the I/O line is bistate, not tristate (so there is no 'floating' state during operation).
I'm still struggling to understand this bit. From the host adaptor side, the bus is being driven by a 7438, which is an open collector device, so the output is either high impedance, or being pulled to 0v. When the host adaptor is driving, and puts the 7438 into a high impedance state, I would have again assumed the potential divider to be in operation and therefore the bus would be driven at 3v, and not 5v?

...and this is where I then started to question whether or not it was appropriate to use a 245 to buffer, as this device would put 5v on the bus when driving (and 3v when the outputs are disabled).

User avatar
simoni
Posts: 548
Joined: Wed May 25, 2016 7:18 pm
Contact:

Re: New SCSI Host Adaptor

Post by simoni » Wed Sep 16, 2020 9:25 pm

Right; I'm suffering from spending too much time playing with the AIV SCSI adaptor which has a better design... If the design does use a swing between 0V and 3V, it's not a good design as it wouldn't function if the device used CMOS buffers :) It's possible that the input circuitry on the 74LS240 is changing things though. I couldn't find a clear diagram showing the set up of the input pins for the chip.

The weird set up of the original host adaptor is a lot to do with the fact that the designer felt the need to invert the databus in hardware rather than (as in the better AIV design) simply letting the software do that. Thinking about it; it might be better to follow the IO design of the AIV SCSI adaptor - you can simply use the CPLD to invert the bus if required.

I only have one of the original SCSI adaptors (and it's in my Winchester drive connected to a Master) - otherwise I'd grab a spare original board and poke it with a scope to see what's really happening.

dp11
Posts: 1199
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New SCSI Host Adaptor

Post by dp11 » Wed Sep 16, 2020 10:29 pm

SCSI Bus is designed to be driven with an open collector drive. The terminator is designed to terminate the bus at typically 2.85v. One of the reasons for open collector is if multiple devices are on the bus with the same IDs there won't be a bus conflict.

Input levels need to be : Vih >2v , ViL<0.8v . CMOS wasn't wasn't common at the time for want would have been a fast bus, so the specification was based on TTL

If you know there is one device on the bus then you could drive the bus with a push pull instead of an open collect driver. You need to check that you can drive 24mA with a VoL <0.5v . The bus should still be terminated.

Not doing the inversion in hardware would just slow down the software as every byte has to be inverted.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Sep 16, 2020 11:01 pm

Thanks, both, for the feedback and for verifying my understanding.

So, going back to my CPLD based host adaptor, I stuck a 74HCT245 on the data lines, between the CPLD output and the drive. CPLD -> 245 'A' -> 245 'B' -> SCSI Drive. I then connected SCSI I/O line to both DIR & /OE on the 245. I wasn't sure if either or both of these needed to be inverted, so I put the SCSI I/O signal through an inverter, so I could test all 4 combinations. Unfortunately I couldn't get it to work with any of these combinations. One combination gave a 'Broken Directory' on Break, all other 3 just caused the beeb to hang on Break.

I then realised that I was being stupid using the 245 as a bi directional device and relying on the SCSI I/O signal (as used on the original board) to isolate the bus (using /OE), since /OE will disable the outputs in both directions and would prevent the drive from writing back to the CPLD. I think I'll try putting 2 x 245s in opposite directions, force DIR in both 245s to fix the direction, and then wire in the SCSI I/O signal to /OE on one, and an inverted version of the SCSI I/O signal to /OE on the other! A job for tomorrow.
dp11 wrote:
Wed Sep 16, 2020 10:29 pm
If you know there is one device on the bus then you could drive the bus with a push pull instead of an open collect driver. You need to check that you can drive 24mA with a VoL <0.5v . The bus should still be terminated.
Ah, good point. I'd forgotten to put termination on the bus side of the 245.

dp11
Posts: 1199
Joined: Sun Aug 12, 2012 9:47 pm
Contact:

Re: New SCSI Host Adaptor

Post by dp11 » Wed Sep 16, 2020 11:47 pm

Remember 74hct245 can't drive 24mA so won't work.
Last edited by dp11 on Thu Sep 17, 2020 7:30 am, edited 1 time in total.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Thu Sep 17, 2020 1:25 am

I think I've found what I need:
Datasheet wrote:The IDT74FCT621T is an octal transceiver with non-inverting OpenDrain bus compatible outputs in both send and receive directions. The B bus outputs are capable of sinking 64mA providing very good capacitive drive characteristics. These octal bus transceivers are designed for
asynchronous two-way communication between data buses. The control function implementation allows for maximum flexibility in timing.
https://www.idt.com/us/en/document/dst/ ... -datasheet

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Thu Sep 24, 2020 12:49 am

Here's a render of the latest adaptor plate to connect 80 pin drives to the SCSI host adaptor. This one has the IDT74FCT621T buffers and additional external termination required for the 80 pin drives to work.

This will hopefully also address the marginal low voltage threshold that was discussed earlier in this thread:
cmorley wrote:
Wed Apr 08, 2020 10:10 am
As hoglet predicted you are closer to 0.6-0.7v than 0.2v. This is greater than the 0.5v maximum output voltage for asserted signal and doesn't give you much margin to the 0.8v input threshold for asserted signal.

I would buffer it.
I really wanted to check that my buffer IO / data directions are right before I place a new PCB order, so I ordered a small sample of buffer ICs from a UK based eBay seller, but they cancelled my order because they didn't have any in stock :(. Other UK based eBay sellers are charging stupid prices, so I'm now waiting for delivery from China.
SCSI Adaptor Connector 4.PNG
SCSI Adaptor Connector 5.PNG

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sat Sep 26, 2020 12:15 am

Decided that the components really need to go on the other side of the board:
SCSI Adaptor Connector 6.PNG
Host Adaptor Buffer Board
Ordered up a prototype board that will use thru hole components, just to test it all out before I commit to these boards with SMT components. Also waiting for the buffers, which will be a couple of weeks yet.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sat Oct 03, 2020 3:30 pm

Ok folks, the 74FCT621T Bi Directional Non Inverting Open Drain Buffer ICs arrived earlier this week, so I decided to solder them onto a bit of veroboard to test. Currently, my host adaptor connects to an unterminated 80 pin drive via a special connector plate. I've disconnected the host adaptor board from the connector plate and inserted the buffers in line. I've attached a schematic of the arrangement. Unfortunately, It's not working correctly, and I suspect it's got something to do with the data bus I/O signal I'm using to set the direction (I've taken this from the original schematic). If I bypass the data buffer completely and use only the control line buffer it works ok, but if I put the data buffer back in line it fails to work. I've tried inverting (and double inverting) the I/O signal to the data buffer direction.

Note that I do intend to use the buffer and associated 220/330 terminating resistors for the 3 SCSI signals that are currently pulled up by the 3 x 2K2 resistors. It's just that these three resistors are currently already soldered onto the connector plate and I don't currently have the necessary terminating resistors on the host adaptor side of the buffers. I don't think this is relevant, since this arrangement works when I bypass the data buffer.

Looking for any words of wisdom. Anything obviously wrong with what I've done?

Thanks

Edit 1: And just for clarity, I've tested the buffers stand alone to make sure I understood what 'non inverted' actually meant. With the 220 / 330 ohm biasing resistors on the output (tied to 5v and 0v respectively), if I applied 5v on the input, I measured about 3v on the output, and if I applied 0v on the input, I measured 0v on the output. Referring back to the datasheet, in this test case 'A' was the input and 'B' was the output, and pins 1 / 19 were held at 5v to set direction A -> B. On this basis, I'm pretty sure I don't need to invert any of the data signals in the CPLD, but happy to be corrected on this.

Edit 2: Also, according to the datasheet, the worst case buffer propagation delay is 14ns, so I believe this should be more than quick enough for anything connected to the 1MHz bus?
Attachments
SCSI Host Adaptor Buffer Schematic.PNG

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sun Oct 04, 2020 2:49 pm

Time to get the scope on it...

So (referring back to the schematic in the previous post) here, I'm measuring:
Channel 1 (Yellow): CPLD_I/O, which is the buffered version of SCSI_I/O
Channel 2 (Cyan): SCSI_DB7
Channel 3 (Magenta): CPLD_DB7

In the CPLD I've temporarily modified the code so that it drives CPLD_DBx high and low instead of being open collector. The terminating resistors remain in place. From this, everything seems to work as expected.

When CPLD_I/O is high:
Buffer data direction is A (CPLD) -> B (Drive)
SCSI_DB7 (which is the section between the drive and the buffer) is sitting at a quiescent 2.8v.
CPLD_DB7 (which is the section between the CPLD and the buffer) is sitting at 3.3v, which is the output voltage of the CPLD
To me, this implies that the CPLD is driving CPLD_DB7, and because it's logic high (3.3v), SCSI_DB7 is being driven to 2.8v courtesy of the biasing / terminating resistors.

When CPLD_I/O goes low:
Buffer data direction is B (Drive) -> A (CPLD)
SCSI_DB7 remains at a quiescent 2.8v (there is a spike down to 0v, which I'll cover separately)
CPLD_DB7 drops from 3.3v to 2.8v (apart from when it also spikes down to 0v).
To me, this implies that the CPLD is no longer driving CPLD_DB7, and it is now being driven to 2.8v courtesy of the biasing / terminating resistors.
>
DS1Z_QuickPrint11.png
SCSI trace triggered on CPLD_I/O falling edge
>
If I zoom in on the section where CPLD_I/O is sitting low, I can see that SCSI_DB7 and CPLD_DB7 both drop low for a short period (note that both are very solid 0v, which is what I was looking for from the buffer). I believe the drive has pulled this signal low, which is what I'd expect when CPLD_I/O is low:
>
DS1Z_QuickPrint12.png
Zoom in showing DB7 activity when CPLD_I/O is low
DS1Z_QuickPrint13.png
And zoomed in even further
>
Still looking for some thoughts as to what might be going wrong.

Thanks

Edit 1: And this is the same as above, but monitoring DB1 instead of DB7:
>
DS1Z_QuickPrint14.png
Monitoring DB1 instead of DB7

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sun Oct 04, 2020 4:03 pm

As previously mentioned, everything works fine if I bypass the buffer for the 8 data lines, so I thought I'd scope for differences. One interesting difference so far, is that I don't get the short spike down to 0v when CPLD_I/O is low. I now need to try and work out why this is happening:
>
DS1Z_QuickPrint15.png
Monitoring DB7 with the buffer bypassed
DS1Z_QuickPrint16.png
Zoomed in
Edit 1: Cleaned up the veroboard that houses the data buffer and I now no longer get the short spike, but it still doesn't work and I now no longer get the DB0 trace that I was seeing previously. I wonder if all the dupont wires I'm using is causing an issue. I've got a prototype board coming from China which should eliminate that as a possible cause.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Sun Oct 04, 2020 11:42 pm

Interesting. I've hooked up my 8 channel logic analyser to monitor the 8 control lines. With the data buffer bypassed, and triggering on RST, I got the following good trace:
>
SCSI Capture 1.PNG
Good reset
>
I then put the data buffer back in line, and ran the test again. Curiously, on initial reset the drive was recognised, but unfortunately I didn't have the analyser running. On subsequent resets, I get the BBC Micro / Acorn ADFS prompt, but the screen then turns totally white. The computer hasn't crashed completely, as I can still toggle Caps Lock on / off, but I don't seem to be able to type any commands (for example *MOTOR1 doesn't turn the Motor LED on - I don't have the speaker plugged in, so can't use the Ctrl-G test). This is the trace I get when the screen goes white:
>
SCSI Capture 2.PNG
Bad Reset
I am now wondering if my 3 x 2k2 pull up resistors on ACK/RST/SEL are causing the problem. I'm going to change them to the standard 220 / 330 terminating resistors and see what difference that makes...

Edit: Sorted!!! Adding the correct termination on the three ACK/RST/SEL lines has fixed it #-o. I guess I shouldn't really be surprised :lol: :lol: :lol: :lol:
Last edited by KenLowe on Mon Oct 05, 2020 12:02 am, edited 1 time in total.

User avatar
BeebMaster
Posts: 3637
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: New SCSI Host Adaptor

Post by BeebMaster » Mon Oct 05, 2020 12:02 am

I can't help with this problem, I'm afraid, but I can report that I had some similar weird behaviour earlier today with completely different hardware. This was with my Double WInchester Disc which just wouldn't get recognised by ADFS for ages. The discs both spun up to speed, and were recognised by the controller one by one, but there was no response from ADFS. Then a bizarre thing started to happen every time I pressed CTRL-A-BREAK. I would get the flashing cursor after the Acorn ADFS line, then the screen would change to a pattern of horizontal white stripes all across the screen, then the normal screen would return, but with no cursor.

I checked all the connections several times, but only on checking the last connection, which was the ribbon cable on the host adapter, did I get it to come to life. It felt like there was some sort of overload coming up the 1MHz bus, that's the only way I can explain it.
Image

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Mon Oct 05, 2020 12:14 am

Looks like you posted just as I was doing an edit. I seem to have fixed my problem by adding the correct termination to the ACK/RST/SEL lines.

It's strange how it all seems to work fine with the 2k2 pullups (to 5v) on these three lines if I don't buffer the data lines, and it then fails if I buffer the data lines. I suspect it was all a bit marginal.

I'm currently still not putting these three signals through the control line buffer, but I'll try that tomorrow evening. I'll need to add even more termination, so I've got termination both sides of the buffer, but that should be straight forward!

The prototype board I've got on order is designed for all this termination, so hopefully it's just going to work.

Edit. I spoke too soon. Reads are now working fine, but writes are causing data corruption. That happens if the data buffer is in line or bypassed. I haven't tried to bypass the control line buffer yet, but I suspect it'll still corrupt the drive. I think this is down to the stramash of dupont wires I've got criss crossing each other. I had similar issues very early in this journey - page 2 of this thread to be exact! I'll test with the control line buffer bypassed later this evening, but I do think I really need to wait for my prototype board to arrive and test using that.

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Oct 14, 2020 4:21 pm

Prototype buffer board arrived today, so I've soldered on the buffers, termination resistors and connectors, and given it a test. Unfortunately, it's still not working correctly :x. Buffers and resistors are socketed so I can remove them easily. Having carried out a number of tests, I've been able to establish a few things:
  • Viglen (discrete component based) host adaptor with my original non buffered backplane board: Reading and writing both work flawlessly.
  • CPLD based host adaptor with my original non buffered backplane board: Reading and writing mostly working fine, but will see some occasional data corruption
  • Viglen host adaptor coupled with my new prototype buffered backplane board: Reading and writing both work flawlessly.
  • CPLD based host adaptor coupled with my new prototype buffered backplane board: Reading works fine, but writes are causing data corruption on the drive.
So, given that I can read from and write to the drive using the Viglen host adaptor, I'm inclined to believe the buffer board is working ok.

Hmmm...

Here's a schematic that shows the ovarall arrangement, in case anyone can spot anything obvious. I'm having a look through the CPLD code again to see if I can determine what might be going wrong.
SCSI Host Adaptor Buffer SchematicV2.PNG
SCSI Host Adaptor with buffered backplane.
Edit: and here's a couple of photos of the buffer board:
20201014_163509.jpg
Back of buffered backplane
20201014_165601.jpg
Buffered backplane connected to SCSI drive

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Oct 14, 2020 8:19 pm

Right, I'm hoping I might have solved this. I fiddled around with some of the fitter settings, and it's now working. I can't recall exactly what settings I changed. I'm pretty sure I removed the check from the 'Remove Timing Constraints' option, and possibly also the 'Use Multi-level Logic Optimization'. It seems to work with these options:
Fitter.PNG
Fitter Options
Do these look ok, or am I way off the mark here?

Edit: So, I reset the fitter options back to the default values, and tried again. Got the write corruption again. This time I changed (removed) only the 'Use Multi-level Logic Optimization' option, and that seems to have fixed it again. As part of the fault finding a few months ago I had switched the 'Output Slew Rate' to slow, but it now seems to be happy with the default fast option.

This definitely seems to have fixed it. It certainly seems much more robust.

User avatar
BeebMaster
Posts: 3637
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: New SCSI Host Adaptor

Post by BeebMaster » Wed Oct 14, 2020 10:27 pm

I don't think I can help but I hope somebody who knows about this sort of thing will chime in. I do find though that talking to an empty room on the forum often engenders some sort of divine inspiration. Most of my threads end with 6 unanswered messages from me during which I have worked it out for myself.
Image

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Wed Oct 14, 2020 10:52 pm

BeebMaster wrote:
Wed Oct 14, 2020 10:27 pm
I don't think I can help but I hope somebody who knows about this sort of thing will chime in. I do find though that talking to an empty room on the forum often engenders some sort of divine inspiration. Most of my threads end with 6 unanswered messages from me during which I have worked it out for myself.
My own personal blog :lol: :lol:

I do actually find it quite useful recording what I've done and what I've found. I can refer back to it later, and it just might help someone in the future. My broken microwave thread is an example of that - well it would have been if I'd actually got to the bottom of that problem.

I do worry sometimes when I post that folks think - 'sigh. it's him again'! but I really don't mind if I'm talking to myself. I don't get offended if no-one responds. If someone can chime in, then great, but otherwise I'll plod on...

Bottom line, I fully understand this is not my personal help desk :lol: :lol: :lol:

Anyway, back on topic. My earlier successful test was with a host adaptor that uses a 100 pin CPLD. I switched over to a newer adaptor that I've built using a 64 pin CPLD and modified the fitter config as per the 100 pin CPLD, but that in itself wasn't enough.

In the 100 pin CPLD I had also removed a bit of redundant logic relating to Internal / External host adaptors and I needed to remove this in the 64 pin CPLD too. Once I'd done than, it also sprung into life. Go figure!

Oh, and the 1/8w terminating resistors on my host adaptor board are now getting quite toasty. They're obviously driving a bit more current into the buffers than they were previously driving into the drive. I did a quick power calc a couple of weeks ago, and everything appeared in order. I'll need to revisit that!

Edit: Actually, even without the buffer board, these resistors are getting quite warm. In fact probably warmer than when they're driving the buffers.

Edit2: Managed to do a bit of drive compacting, which involves quite a lot of disk reads and writes, and everything still seems to work fine. No noticeable corruption so far!

User avatar
KenLowe
Posts: 1403
Joined: Mon Oct 18, 2004 5:35 pm
Location: UK
Contact:

Re: New SCSI Host Adaptor

Post by KenLowe » Thu Oct 15, 2020 7:55 pm

Everything's still working fine!

Decided to solder up a second prototype board, but this time I've ditched the sockets, and soldered everything direct. This board is also working fine, so I'll use it for further testing. One test in particular I want to do is to check the 0v level either side of the buffer. Without the buffer it was sitting a bit high.

The final board wont be as tall as this. It will be the same size as the unbuffered board.
20201015_194610.jpg
Prototype buffer backplane

Post Reply

Return to “8-bit acorn hardware”