USB Mass Storage Device

Forum for problems or queries regarding Flowcode Comms Components. Eg LIN, I2C, SPI, RS232, CAN, IrDA etc

Moderators: Benj, Mods

Post Reply
Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

USB Mass Storage Device

Post by Kumaran »

Hi

Last day I found very useful update of USB pack in your MM site. Can we use any of this component for mass storage device development using PIC? Do you have any examples?

Thanks
Kumaran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Mass Storage Device

Post by Benj »

Hello Kumaran

We thought that mass storage devices were so readily available and cheap that it was not really worth doing a mass storage component. The components available are a COM RS232 replacement, a Slave device and a human interface device. If we get enough requests for the mass storage aspect then it may be worth doing this component too.

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

Hi

The mass storage devices are readily available at lower cost. But the thing is we have some PIC application where we also need mass storage option in addition to other functionalities. In this case we cannot use standard MSD because interfacing is not at all possible.

As a first person, I will make a request. please provide USB MSD as a part of the USB pack which will be useful for us.

Thanks
Kumaran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Mass Storage Device

Post by Benj »

Hello Kumaran

To allow for a mass storage device and also enable data connectivity you would have to create a device with two USB enumeration interfaces. The current Flowcode components will not allow you to do this and it would be a fair amount of work to make it so. Also it would make the current USB components horribly complicated whereas at the moment they are fairly straightforward. You could edit one of the component code C files if you wish to create this dual enumeration functionality but as I say it would be a fair chunk of work. Can you not get away with sending data via one of the other methods already provided?

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

HI

There is no two USB enumeration. I will have the flash memory IC in my PIC circuit to store the data from the sensor. after data acquisition. If I plug the circuit in the PC USB it has to detect as MSD.

Thanks
Kumaran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Mass Storage Device

Post by Benj »

Hello Kumaran

As far as I know to enumerate as a mass storage device you have to be compliant with a form of FAT. therefore you would also have to use a FAT file system on your flash memory. Im not 100% on how all of this works but if you could get away without using a mass storage device then it would potentially save you lots of hassle and weeks if not months of work.

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

as you said there are alternative options. if MSD could be done. then we need not to supply small utility software to interact with the circuit to transfer the data. that's the aim. Also customer can plug the device in any PC for data transfer.

Thanks
kumaran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Mass Storage Device

Post by Benj »

Hello

Ok well it comes down to this list. These are my opinions only but hopefully I can help you to find the best solution.

1) There is no current mass storage component and even if I were given the go ahead to make this then it would take at least a week or two to get it to a workable stage.

2) The HID component does not require drivers etc so you can plug into any PC without the need for drivers.

3) Using a MSD device would require you to write a FAT driver to allow the windows software to be able to retrieve the data.

4) It would be much easier to use a HID, slave or a Serial USB component and then create a simple tool on the PC end to retrieve the data then it would to write the embedded FAT driver (I know I've had to write one in the past and it literally took me months to get my head around the basic structure).

5) using a Windows programming tool such as VB 99.9% of the work has been done for you and there are loads of examples on how to do things like file writing to store your data into a windows friendly format.

6) MSDs are popular and I can see your reasons for wanting one but I think that it is going to add months to your dev time and also without a beefy 32 bit processor your asking a little too much out of a PIC.

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

I appreciate your opinion.
6) MSDs are popular and I can see your reasons for wanting one but I think that it is going to add months to your dev time and also without a beefy 32 bit processor your asking a little too much out of a PIC.
The 6th I have seen an application note in microchip for 18F series PIC devices and also I have seen an examples in proteus simulation. that is why asked it.

Thanks
Kumaran

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: USB Mass Storage Device

Post by Benj »

Hello

Ok well I will try to have an unbiased look at it later this afternoon and come back later on with my findings.

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

Attached the proteus simulation file as per AN1003 in microchip.

May be it will be useful for you.
Attachments
picdem.rar
(22.52 KiB) Downloaded 350 times

Kumaran
Posts: 73
Joined: Tue Apr 08, 2008 5:23 pm
Been thanked: 1 time
Contact:

Re: USB Mass Storage Device

Post by Kumaran »

Do you have any update?

Regards
Kumaran

Post Reply