Access Flash Drives with a Microcontroller


Posted on Feb 6, 2014

USB flash drives provide a handy way to store any type of information in a small package. The drives, also known as thumb drives and USB keys, seem ideal for use in data loggers and other microcontroller-based projects. But to access files in a flash drive, a microcontroller must have USB host hardware and support for a file system. Microcontroller-based


Access Flash Drives with a Microcontroller
Click here to download the full size of the above Circuit.

devices often lack these elements. To the rescue is the USBwiz chip from GHI Electronics. With the USBwiz, just about any microcontroller can read and write to files in flash drives. The microcontroller can access the USBwiz via an asynchronous serial (UART) port or an SPI or I2C port. Most microcontrollers support one or more of these ports. The USBwiz can also access USB hard drives and flash-memory cards such as MultimediaCards (MMCs) and Secure Digital (SD) Cards. In this article, I`ll show how to use the USBwiz to create a file in a flash drive, write to the file, and read the file`s contents. I`ll also show how to control the USBwiz from a PC using a terminal utility or Visual Basic. When you have working code on the PC, you can port the code to your microcontroller of choice. Every USB communication is between a host and a device. The host contains host-controller hardware and manages communications on the bus. The device contains device-controller hardware and responds to communications from the host. Host hardware and code are more complex than device hardware and code. PCs contain host controllers and thus can communicate with USB devices, including flash drives. Most microcontrollers with USB support contain device controllers. A microcontroller that wants to access flash drives or other USB devices must have a host controller embedded in the microcontroller or accessed on a separate chip. This is where the...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    Pico ammeter
    Schematic Diagram LM1877 Audio power amplifier circuit
    led How do I amplify a dc voltage that is too weak to trigger the base in a transistor
    schematics electronic telephone ringer
    S53MV Notune SSB giga radio set
    Meter check of a diode
    Sequencer circuit
    AMP-04 0 F 400 temperature measurement circuit
    15V TOP224Y 2A DC output switching power supply circuit



    Top