View Full Version : Atmel Microcontroller as USB Data Stick... Good or Bad
01-08-2010, 01:21 PM
I need to build a kind of pen drive with ability to store say about 10 Kb of data. The data is critical in nature.
As i am already clued with AVR's i am of the opinion , a simple AVR based circuit with USB boot loader would do the trick.
The bootloader would allow me to read and write on the Flash and anything like ATmega168 would suffice in terms of storage.It will be USB 1.1 but speed is not the concern here.
The Atmega + bootloader allows me a single chip solution and packaging into a Pen drive package. Something like AVR Stick from SparkFun.And the solution will be very cheap.
Do you forsee any problems with this idea if used commercially. Or any better ideas ?
01-08-2010, 04:24 PM
I guess mass storage profile (for emulating usb memory stick) need bulk end-points and from obdev page http://www.obdev.at/products/vusb/index.html, "(Bulk endpoints are forbidden for low speed devices by the USB standard.)". As obdev emulates a low speed device so am not sure if it would work.
Few people have attempted it at http://forums.obdev.at/viewtopic.php?f=8&t=3399
Maybe give it a shot.
btw your solution is entirely possible on Microchip 18F4455.
01-08-2010, 05:19 PM
Well I am not trying to build Mass Media Device, Just a simple data storage stick.
Im just trying to have some data stored in USB , which will be accessed using custom drivers written for libusb. It is basically a AVR Bootloader which writes and read flash ( which they normally do ) .
Yes V-USB(OBDEV) is used to build AVR Low speed device.
01-09-2010, 08:57 AM
Use a AT24C128 chip (16KB) with ATmega8 Total Cost would be Arround Rs100 (less than cost of ATmega168) it will ease programming als,o as I found that accessing a Flash is more difficult.
But will increase the size little bit and will not be single chip solution.
01-09-2010, 11:16 AM
@avinash - That was the initial plan , but flash memory was large enough so i went with it.
Other than difficulty i would like to know if there would be any technical issues which might be problematic later on.
01-09-2010, 01:02 PM
I don't thing any other problem will come on the way as It is a relativly simple project (leaving the boot loader part) USB communication and PC end software is easy. As you said the data is sensetive you need to take care of secuirity so that the data can't be stoled by using a AVR programmer !
01-10-2010, 02:47 AM
You are using it as HID, right?
01-10-2010, 03:37 AM
NO itll be basically a USBASP compatible protocol with its own driver ( or should i say USBASP's).
Development wise i dont need any help.What im worried about is can there be any problems later on,currently i dont see any but some people here have more exp with uC's than me so im getting the idea through them.
01-10-2010, 08:57 AM
I never use HID profile for custom usb devices. I think USB is very neatly organised and It hurt my soul by assigning a HID profile (just because it is easy) for something which is FAR from a Human Interface Device (HID)
01-10-2010, 08:59 AM
Oh, so you are using USBasp bootloader than your problem is much simplified! Not much to do.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.