• Please review our updated Terms and Rules here

USB IDE emulator

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
I've kinda hi-jacked the ISA USB thread but I've been talking to myself for the last half dozen posts and my pet project has evolved into something no longer ISA specific. So I figured I would post a new thread and see if some additional discussion develops.

My original motivation was not specifically a USB-IDE emulator but a focused project (any project) with the goal of learning basic EDA and HDL skills. The road I took has lead me to this. A small board with a 40-pin TTL IDE header on one side and a USB type A connector on the other. Plug a single USB mass storage device (eg. flash stick) into one side and the board emulates an IDE hard disk to host controller on the other side.

This idea has been kicked around here some, but it always ends in lack of a .1" PDIP hobby-friendly tech dead end. Unfortunately I still see no way around it - SMD is pretty much locked in. However the design I've been working on is compact enough that I doubt it would use all of 2x3" without delving into the world of leedless components. Right now it consists of a TQFP-100, TQFP-48, TSOP-32, SOIC-8 (x2), SOT-23, SOT-89, XO, crystal, and a few dozen 0603 caps and resistors. And the 40 pin right angle header could be pinned downward with standoffs in the corners for mounding as a daughter to any other IDE project design (XT/IDE, N8VEM, etc); input welcome on mechanical recommendations btw.

Using leedless, the board could be made a lot lot smaller - small enough it could be supported by a 40 pin female header alone - but that drives up cost significantly as I don't feel comfortable soldering BGAs in high volume. And farming it out costs $$$.

I have eval modules right now for various CPLDs and FPGAs plus the FTDI VC2 USB controller. I've already started playing around with firmware design and coding. I've also designed and will soon be ordering an ISA carrier board that lets them all play with each other (see the ISA USB thread). But it won't be available for ~5 weeks. I am comfortable enough with this design path that I can start laying out the production prototype immediately with limited boards available in a similar time window.
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
As far as part choice, our shop (day job) currently uses Lattice FPGAs in most of our products and we have good technical tie-ins there. Hence the choice to use them. Xilinix, Lattice, Altera, and others generally have a free to use set of synthesis tools with similar capabilities. However the new MachXO2 CPLD line from Lattice seems to fit well here. It's large enough at 1.2k LUTs to instance a small MCU, do address decoding to a virtual IDE register file, fire interrupts to the MCU on write access, interface to the USB controller via SPI, and perform DMA between SRAM/SPI/IDE. It's completely self booting off internal flash (as is the VC2), has a built-in regulator so core and I/O can all be run from 3V3, has internal clamping diodes which help with 5V tolerance, and has some hardened cores like SPI. Pretty neat chip in all. And only $9 in qty 1! The VC2 also has a 16-bit MCU with enough of a USB stack and SDK that I've already discovered block based access is pretty trivial.

As stated in the other thread, all hardware design, HDL, and firmware is slated for GPLv2 release. If you have skillet, hacked toaster oven, hot air torch, or other fire starter and want to reflow your own boards, more power to you!

As soon as basic IDE operation works, it might be ready for the public with ATA and CD-ROM support to come in future phases (no promises).
 
Last edited:

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
Sad - was hoping for some input. :(

Well the gerbers for the ISA carrier board for the 3 eval/dev modules are submitted to the PCB house for review and fab. ETA is May 26. I've also started to layout the mini USB-IDE board and do some proof of concept work on standalone FPGA and USB eval boards. The CPLD I'm targeting has a 10 week factory lead atm. Mouser tends to overestimate delivery dates and I may be able to pull some engineering samples direct from Lattice. We'll see.
 

barythrin

Veteran Member
Joined
Oct 5, 2005
Messages
6,256
Location
Texas
It's above my level to offer any assistance but what's behind your idea? At first I incorrectly(?) read it as an IDE->USB cable/converter but now I'm thinking you really are talking about an emulated drive? What might this offer to an end user or what project are you dreaming up? :)
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
Simple. Plug a USB flash stick or USB disk drive into it. Plug the other end into an IDE drive cable going to the IDE controller on a vintage PC. Format and install your favorite OS.

There are plenty of options for plugging an IDE disk drive into a USB port. This lets you go the other way around. eg. Plug a thumb drive into your XT/IDE, etc

It also makes things easier if you have to move files between your old PC and new PC. Just power down your old one, pop the stick out, and insert it into your Windows 7 box. There's nothing special about the flash stick. Normal partition table, FAT32 file system, etc. You can copy file to/from it. Put it back in your old PC and go. No compact flash or parallel IDE hard drives to deal with.
 
Last edited:

kyeakel

Experienced Member
Joined
Jul 27, 2009
Messages
491
Location
Curwensville, PA
Since these devices exist for SDRAM and Compact flash, and are very cheap, the usefulness of having a usb version doesn't seem apparent. Most modern pc's have sdcard interfaces built in, which in my view lessens the desireability as well. Yes, usb sticks are more popular. Now, if you were talking about being able to use usb devices in general with a vintage PC, that would be more likely to generate interest.

Kipp
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
Using USB devices in general was the original scope. eg. Plug a USB 802.11n stick into the card and it would appear to the PC as a 3Com 3C509 or NE2000 etc. But the scope is a bit overwhelming to start.

I was hoping to simplify in the begining and then add that sort of stuff later if there were still interest.

One thing most of those devices you mentioned won't do, is optical drives. I planned on including that in the first board.
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
So my PCBs for prototyping came in this past weekend. I stuffed parts on one and after working through 2 3.3->GND shorts (doh!) I managed to get everything powered up. My free time is drying up due to the new job, as I expected. But I'm moving into an apartment closer to work next month so it will save 2 hours of daily commute. Am still eager to tinker with the project as I have free time. And there's enough toys on the board to fuel way more projects that I realistically have time for.

Due to the dismal amount of interest this thread has generated, I'm tabling the idea of USB->IDE for now and turning my attention to the 32MB RAM part on the prototype; with an eye towards a conventional/XMS/EMS RAM+ROM ISA card. I've gotten more interest in that in PMs alone than this thread has posts. So...

Some photos:

Bare board

Powered Up


I do have extra PCBs but minimal extra parts. If someone were seriously interested in them, I would send them out. But including the eval modules from Lattice and FTDI and all the not-so-cheap headers and sockets, the parts are ~$230. But it would provide you with an ISA card with a:

- MachXO-2280 CPLD connected to 32MB SDR DRAM, 512KB SRAM, UART driver, 4MB SPI flash, 8 LEDs, all ISA pins, 19 signal expansion header, on-board USB JTAG programmer, and 33 Mhz LPC to the FPGA and Super-I/O
- XP2-5000 FPGA connected to 512 KB SRAM, 2x 4MB SPI flash parts, I2C temp sensor, I2C 256 byte EEPROM, I2C RTC w/ battery holder, UART line driver, 4 switches, 8 LEDs, LPC connection to Super-I/O and CPLD, and both SPI and high speed FIFO interface to USB controller
- VNC2 USB controller with high speed FIFO and SPI to FPGA, UART line driver, GPIO header, and 2 type A host or device ports with hub support.

I might even solder it up for you. :)
 

ajacocks

VCF MA Committee Member
Staff member
Joined
Jan 21, 2011
Messages
721
Location
Middletown, Maryland USA
Well, I love the original idea. An ISA USB host would be very useful. I've actually got a Zorro III (Amiga) USB host controller, designed a couple of years ago, and it's very handy.
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
It's not abandoned. It's just taking second chair to getting the RAM board done first. I've actually started preliminary layout of the IDE board tonight. 16-bit (8-bit compatible) full height half length card with a flush to the board slide in mount for 2.5" laptop SATA drive (screw in from back of PCB) and a USB connector either on a header or back-plate (would require custom plates). The SATA support coming courtesy of a new TI USB-SATA bridge. Would only support USB mass storage initially. Possibly optical devices with a future firmware update.

My plan for both boards was to design hardware, code enough HDL to prove the concept, and insure the device has a way of upgrading itself with a failsafe golden image in case something goes wrong. Build some prototypes and send them out to anyone willing to further the project or do extensive testing. Then offer to public. The 2.5" SATA twist is enough incentive to totaly ditch the USB-PATA bridge board and go that route instead.
 

schlang

Member
Joined
May 8, 2011
Messages
43
awesome work man! in general I'm interested in a ready-to-use exemplar, ideally with an USB port on the back-plate.
could you please make me an offer via PN?

you mentioned that it supports usb mass storage, which operating systems do you cover?
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
This project is suspended until I can get two others out ahead of it. Will be a couple months before even prototypes are ordered. Though discussion is always welcome.

There is no need for special OS support. I'm targeting register level emulation of ATA-2.
 

MikeS

Veteran Member
Joined
Dec 23, 2005
Messages
7,492
Location
Toronto ON Canada
awesome work man! in general I'm interested in a ready-to-use exemplar, ideally with an USB port on the back-plate.
could you please make me an offer via PN?

you mentioned that it supports usb mass storage, which operating systems do you cover?
I don't get it; there are dozens of IDE to SD/SDHC/MMC/CF etc. card adapters out there for $15 - $30 (ATAPI compatible and with a back plate if you like), and another buck will buy you an SD to USB adapter at the local dollar store (or you can use dual-mode SD/USB cards), so what makes this device special?
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
@schlag: That is a test bed for development. I actually do have spare PCBs, but the parts kit cost a few hundred and unless your proficient w/ Verilog or VHDL, it wouldn't be much use atm.

@MikeS: That's part of the reason this got down prioritized (that and work). However only about 1 in 5 CF cards I tried with the XT-IDE BIOS (on a full 16-bit IDE controller) actually worked. I haven't tried SD cards. Perhaps they work better.

Most of the SD->IDE adapters are built around a small ASIC. This would be the same thing for native USB (thumb) drives which are arguably more ubiquitous. And last I checked, you can't buy an optical drive with a CF/SD/SDHC/MMC interface.
 

schlang

Member
Joined
May 8, 2011
Messages
43
I don't get it; there are dozens of IDE to SD/SDHC/MMC/CF etc. card adapters out there for $15 - $30 (ATAPI compatible and with a back plate if you like), and another buck will buy you an SD to USB adapter at the local dollar store (or you can use dual-mode SD/USB cards), so what makes this device special?

well, first, the price does not matter (I'm not 12 years anymore and have to watch on my pocket money), second, I don't want crappy flash drives ass minor HDD replacement, and third I just want to have hot plug USB support on my 386 :)


@schlag: That is a test bed for development. I actually do have spare PCBs, but the parts kit cost a few hundred and unless your proficient w/ Verilog or VHDL, it wouldn't be much use atm.

basic VHDL knowledge here
 

pearce_jj

Veteran Member
Joined
May 14, 2010
Messages
2,791
Location
UK
I don't follow why this has had such a frosty response... who care's why, it's technically interesting, end-of. None of what is discussed on this forum serves any useful purpose - and by definition :)
 

eeguru

Veteran Member
Joined
Mar 14, 2011
Messages
1,618
Location
Atlanta, GA, USA
Yeah, my only goal was 'just because'. I'm trying to get the PCjr-IDE card prototypes ordered this week. Then onto the 32MB EMS/XMS ISA card over the next few before getting back around to this project (which has a very similar hw platform to the RAM board - hence possible parallel development).
 

MikeS

Veteran Member
Joined
Dec 23, 2005
Messages
7,492
Location
Toronto ON Canada
I don't follow why this has had such a frosty response... who care's why, it's technically interesting, end-of. None of what is discussed on this forum serves any useful purpose - and by definition :)
Of course it's interesting, and I didn't mean to sound as negative as I probably did. I'm just wondering what, if anything, it offers over the existing flock of similar IDE<>SD/HC adapters; if it really is equivalent at a substantially higher price then I'm not surprised that there's not much interest.

We're not talking about dumb IDE to CF adapters, but intelligent IDE to SD(HC) converters; SD cards are (were?) available with USB interfaces, but in any case SD<>USB adapters are everywhere. Despite their IDE compatibility I think CF cards are getting obsolete and pretty well all the floppy and hard disk emulator replacements out there are using SD cards or USB sticks these days.

Maybe I'm still missing something: are we talking about a device that connects a system's IDE port to a USB memory stick, emulating a PATA or ATAPI device? In which case I don't get what eeguru means about the optical drive's lack of a "CF/SD/SDHC/MMC interface"? An IDE hard disk doesn't have a CF/SD/SDHC/MMC interface either; what am I missing?
 
Top