11

I was just wondering if there was a tutorial anywhere on how to make your own USB Flash Drive and I don't mean take apart a USB and put the guts into something else, I mean put together the flash memory and controller.

jpc
  • 5,302
  • 1
  • 24
  • 45
GLaDOS
  • 263
  • 2
  • 3
  • 8
  • 4
    Your title should be "DIY USB Mass storage tutorial" because you are specifically asking for a tutorial on how make your own flash drive. A question about making your own USB gadgets has been asked a while ago. – bpijls Jan 17 '10 at 14:11
  • @bpijls I have changed the title. – jpc Mar 23 '11 at 21:18

6 Answers6

13

Dean Camera has written a USB stack for the AVR. It includes a mass storage driver.

http://www.fourwalledcubicle.com/LUFA.php

Mitch Davis
  • 131
  • 2
  • 1
    LUFA is very good. And the AVR USB chips are getting better and better. If you prefer to develop on Linux or OSX, LUFA on an AVR is a good choice. If you're Windows, then look at the PIC development environment. The low-end PIC USB chips have more features and are easier to use than the low-end AVR USB chips, but you really can only develop for them on Windows. – todbot Feb 10 '10 at 17:32
  • 1
    Just an update about developing with PICs. The new Microchip IDE, MPLAB X (which is still in beta) is based on NetBeans and allows PIC development on any of the major platforms (Windows/MAC/Linux). – bt2 Mar 24 '11 at 03:14
7

A question about general USB devices was asked a while ago, but you are specifically referring to a USB mass storage device (MSD)

Jan Axelson (from http://janaxelson.com) has written a book about it: http://janaxelson.com/mass_storage.htm

bpijls
  • 2,271
  • 15
  • 18
3

You could base it on this project of mine:

http://www.leonheller.com/usb

Leon Heller
  • 38,774
  • 2
  • 60
  • 96
2

IMHO the easiest way is to use an AT90USB or LPC1343. The latter has mass-storage device firmware stored in ROM so you only need to supply some details for the device descriptor and 2 or 3 Flash access procedures.

jpc
  • 5,302
  • 1
  • 24
  • 45
1

You could also consider the Cypress FX2. It's a Hi-Speed USB chip that comes with Mass Storage Driver support. Dunno about any tutorials for it, but it's a pretty popular chip.

ajs410
  • 8,381
  • 5
  • 35
  • 42
1

How about a good book on how usb works?

Then when you start to program, you know how things are supposed to work...

Johan
  • 2,385
  • 2
  • 25
  • 27