Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

New Project: PIC based USB stick, need starting point

Status
Not open for further replies.

rgbphil

New Member
Hi,

I'm starting a new project, a PIC based device that fits directly into the USB port of the computer like a USB memory stick. Before I start I'm looking for any references to other projects to save some time not reinventing the wheel.

Can anyone point me to projects that have one or more of the following:

It'll need a rechargable battery, so far I'm looking at using an Ipod nano battery. NiMh buttons were also considered, but don't have enough capacity. Any specs on small, thin batteries and recharging circuits that get power from the PC USB port? Do Ipod nano batteries have some sort on onboard controller that needs to be talked to, or will a simple lithium charging circuit suffice?

Male USB-A plug. I'm thinking of just using PCB tracks. Any projects that have done the same? Any issues people know of plugging PCBs into computers?

Some sort of file system. I'd like to create files and mount the USB device as a USB disk. Don't need to create files from the PC, but will need to erase them. If all else fails I'll just use a CDC i/f.

Prefer Sourceboost and the 18F4550 range of PICs.

As I said, just looking for similiar sorts of projects.

Phil
 
Microchip have an application note on implementing a USB Mass Storage Device. Have a read of AN1189. You will also need to implement the fat16 file system (An1045) and it will be limited to 2Gig capacity. The reason I know these AN numbers is because I have them next to me as I am about to embark on a very similar project. My initial attempt will be to try and make a 128k memory stick using a 18f4550 and 1M I²C EEPROM.

Mike.
 
Sounds very similar to my project, except the 1Meeprom is a 16Mbit chip from sparkfun
https://www.sparkfun.com/commerce/product_info.php?products_id=301

I'm hoping to log time/data files of temp/humidity etc, the idea is the device gets charged when plugged into the computer then you put it where you want to monitor, set it going then come back and pull the logs off the stick just by plugging it back in. Every time you start/stop the device a new file is created, an RTC on the 18F4550 timestamps the files.

Phil
 
That's the limit of the FAT16 system. To go bigger you would need to implement FAT32.:eek:

Mike.

FAT32 is more involved than FAT16.

Though it is uncommon, one can go up to max 4GB with FAT16 using 64Kib cluster size. Win98SE can read/write them and Win2000 and later have no problem in using them. FAT16 might as well be a better choice than FAT32 on a 4GB partition if the total number of files is small but the file size is relatively large.
 
Status
Not open for further replies.

Latest threads

Back
Top