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

    Variable Voltage Regulator
    Remote Control Tester
    water level sensor circuit
    Digital Thermometercum- Controller using AT89s52
    Water level controller using 8051
    Mains Powered White LED and Grand Prix Starting Lights circuit
    bi directional level shifter
    DDR SDRAM and the TM-4
    Telephone Status Indicator Circuit
    Three Hour Timer
    Arduino AVR High-Voltage Serial Programmer
    Audio Signal Generator
    Binary gain step circuit diagram by the PGA205



    Top