LVD/SE SCSI PCMCIA drive (Click to enlarge)
Click here for more pictures.
This project is based on the SCSI controller that I have developed for
the SCSI RAM disk project.
Implementing a PCMCIA controller instead of the DRAM controller should not be too difficult I thought ...
The result is a 3.5" PCMCIA Type III drive that fit into the bay of a DDS drive.
Some modificatons have been implemented for the SCSI controller:
This is the hardware documentation:
I have designed the PCBs with Eagle V4.09 for GNU/Linux from Cadsoft Computer GmbH. The prototypes of the PCBs were manufactured by Beta Layout GmbH for me.
The schematic and layout data can be downloaded here:
I claim only the right of being the originator of the schematic and layout, feel free to use it for everything you want. Some libraries are modified versions and originally created by Cadsoft. You can use the modified libraries for any purpose (the terms of Cadsoft apply if I overlooked something and this is not allowed).
SCSI controller and PCMCIA socket board (Click to enlarge)
Under the SCSI controller board there are 4 aluminium parts with
threads on the side and on the bottom for the drive mounting screws.
The PCMCIA board is mounted using standard 20mm distance bolts at the
rear and 2 small plastic blocks on the front. These blocks also have
2 threads on the front side to mount the bezel.
The bezel is made from a 5.25" slot cover of a computer case. Two
strips of the remaining material are glued on the backside to get the
correct thickness of 4mm:
This is the documentation for the mechanical parts:
The SCSI controller uses two AVR microcontrollers which need firmware to work. I have developed the firmware on a GNU/Linux host, it should be possible to build it with the shipped Makefiles on any UNIX host if the following tools are available:
Source code and images for Flash-EPROM and EEPROM are included in the packages.
The PIA firmware is written in assembler and relatively small (about
4KiByte). The PIA controls the SCSI bus by implementing the SPI (SCSI
Parallel Interface) and provides a SDS (Service Delivery Subsystem as
descibed in the SAM document) to the Target module.
PIA firmware is available under BSD license:
The Target firmware is written in C and about 59KiByte in size (mainly
due to string constants and inlining what effectively doubles the size
of the real code). The target implements the
task routing functionality (and the handling of INQUIRY and REQUEST
SENSE commands for nonexisting LUNs).
A PCMCIA controller is implemented as logical unit of Type 0
"direct access" that should comply to the SPC and SBC
Target firmware is available under GNU general public license:
The target firmare contains a debug system that can print messages via
the AVRs USART to a terminal. A level converter like MAX232 must be
connected to CON30. The debug messages for different modules can be
separately enabled and disabled (the module is printed in brackets).
The device scan of my Advansys 3940U hostadapter issues a SCSI bus reset and executes an INQUIRY command. This is logged like this:
SCSI controller debug system ============================ Hardware: V2.0, Firmware: V1.0 (Build: 2006-06-17T16:51:23 UTC) Init target: Create UNIT ATTENTION condition for LUN 0 (Reset) Enable interrupts ... OK Target POST: SRAM test ... OK POST complete Init PCMCIA card services: PCMCIA card found Init PIA: Read our SCSI ID from jumper block ... 6 Configure PIA for target mode ... PIA has enabled the SCSI interface Boot complete Starting taskrouter [Task router] Prepare for next task [Task router] Idle [Task router] ***Alert*** SCSI bus reset detected! Soft reset Hardware: V2.0, Firmware: V1.0 (Build: 2006-06-17T16:51:23 UTC) Init target: Create UNIT ATTENTION condition for LUN 0 (Reset) Enable interrupts ... OK Skip POST for soft reset Init PCMCIA card services: PCMCIA card found Init PIA: Read our SCSI ID from jumper block ... 6 Configure PIA for target mode ... PIA has enabled the SCSI interface Boot complete Starting taskrouter [Task router] Prepare for next task [Task router] Idle [Task router] An initiator selects us [Task router] Connected to initiator with SCSI ID 7 [Task router] I_T nexus established [Task router] ATTENTION condition detected [Task router] Receive message from initiator [Task router] Message: C0 [Task router] IDENTIFY message received [Task router] LUN 0 selected [Task router] I_T_L nexus established [Task router] Receive command from initiator [Task router] Check for reservation conflict [LUN 0 Taskmanager] Check for reservation [Task router] Create task for LUN 0 [LUN 0 Taskmanager] Create task [LUN 0 Deviceserver] Execute task [LUN 0 Deviceserver] CDB: 12 00 00 00 24 00 [LUN 0 Deviceserver] Search for medium [LUN 0 Deviceserver] Medium found [LUN 0 Deviceserver] Medium is an I/O device (ATA controller) [LUN 0 Deviceserver] Medium size: 61MiByte Create UNIT ATTENTION condition for LUN 0 (Not ready to ready transition) [LUN 0 Deviceserver] Command: INQUIRY [LUN 0 Deviceserver] Command successfully completed [Task router] Success, report status GOOD [Task router] Send TASK COMPLETE message [Task router] Release SCSI bus [Task router] Prepare for next task [Task router] Idle
A Linux boot (with partition table on the card in the drive) on my Sun machine looks like this:
-------------------------------------------------------------------------------- esp0: IRQ 36 SCSI ID 7 Clk 40MHz CCF=8 TOut 167 NCR53C9XF(espfast) ESP: Total of 1 ESP hosts found, 1 actually in use. scsi0 : Sparc ESP100A-FAST scsi : 1 host. Vendor: SONY Model: CDU 561 SUNMSCD Rev: 1.9k Type: CD-ROM ANSI SCSI revision: 02 Vendor: SEAGATE Model: ST31200W SUN1.05 Rev: 8566 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sda at scsi0, channel 0, id 3, lun 0 Vendor: Selfmade Model: PCMCIA drive Rev: V2.0 Type: Direct-Access ANSI SCSI revision: 03 Detected scsi removable disk sdb at scsi0, channel 0, id 6, lun 0 scsi : detected 2 SCSI disks total. esp0: target 3 [period 100ns offset 15 10.00MHz FAST SCSI-II] SCSI device sda: hdwr sector= 512 bytes. Sectors= 2061108 [1006 MB] [1.0 GB] SCSI device sdb: hdwr sector= 512 bytes. Sectors= 245504 [119 MB] [0.1 GB] sdb: Write Protect is off Partition check: sda: sda1 sda2 sda3 sdb: sdb1 --------------------------------------------------------------------------------