[PIC] how do i access RAM on a USB flash drive ?

Status
Not open for further replies.

peter001

Newbie level 3
Joined
Mar 1, 2014
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
36
hello smart people, nerds, wiz-kids and enthusiasts

i need the protocol to access memory on a USB stick

i know that i send address, data and control information to access a location in flash ram, but what is the format

address first (LSB to MSB), data second, then a read or write control byte third

i noticed that as something becomes worth more on the market, it becomes harder to get concise and comprehensive technical data

the PIC18F4455 microcontroller has a 430 page data sheet. usefull for actually designing operational circuits

3 pages for a USB stick? useless if i want to hook it to my PIC development board

the USB protocol aint a problem. theres tons of data on that

all answers welcome, except realy dumb ones

peter

when in doubt, ask
 

the USB protocol aint a problem
Isn't it? But you don't understand it at all. A simple point, difference between USB device and host. There's no device-to-device communications option. You need an USB host, e.g. a PIC24 processor to access an USB device like a memory stick.

There are example projects in the Microchip application library. ("USB Host MSD").
 

i found a thread that answered my question

see jan axelson's lakeview research (**broken link removed**)

in order to access usb ram, one uses the 'universal serial bus mass storage class' protocol

it is a wrapper for the 'small computer system interface' (scsi), a standard mass storage protocol

for a PIC, reference the 'microchip usb device firmware framework user’s guide',

and microchips document AN1189, 'implementing a mass storage device using the microchip USB device firmware framework'

thankyou FvM, for telling me that i need a PIC24 as the host in a USB system

helpfull

peter taylor
 

The USB Mass Storage Class is just one of several USB device classes, as FvM has pointed out, the real issue is that a USB Host is required to interact with a Device Class.

By the way, it is not RAM, but Flash storage in a "USB memory stick."

You might also consider the PIC32, as it can also implement a USB host.

BigDog
 

random access memory

read only memory

which is flash memory

it is not ROM

FvM did not point out that the 'USB Mass Storage Class ' is only one class of many

peter taylor

a dumb question is one not asked
 

Flash is Flash, it's nonvolatile storage and therefore it is sometimes referred to as ROM by programmers, etc, however it is method of storage unto its own.

Flash has replaced the use of various ROM implementations for code storage in most microcontrollers.

There are several distinct advantages to utilizing Flash over EEPROM/EPROM.

Flash Memory

There are several USB Device Classes, such as MSD, HID, CDC, etc.

Jan Axelson's text on USB covers the most commonly implemented classes.


BigDog
 

FvM did not point out that the 'USB Mass Storage Class ' is only one class of many
No, I didn't, just wanted to point the direction.

Your summary from Axelson is the long story about it. I've worked through it practically at times when no ready-made MSD stack was available. The short story is that Microchip has done the work for you now.
 

right there are three types of memory

random access which is volatile ie flip flops

random access which is non-volatile ie flash

read only memory ie rom prom eprom eeprom

so how is flash not RAM

peter taylor
 

The "should flash memory be considered as RAM" point tends to turn into a scholastic discussion.

Literally you are right, technical term usage is however different. I think most experts will agree with the below Wikipedia quote (from

 

Hi guys I am trying to implement USB embedded host for printer .
Till now i have been able to Send and recieve 8 byte data from the USB to the printer .i.e the initial setup command and then recieve the length of the Device descriptor ..which is 18 bytes .
But when i tried to recieve the complete Device descritpor i . recieve the first 8 byte only correctl .
Also i tried GET_DEVICE_ID command for printer class .. and printer the result through hyperterminal .. i again see the same pattern .. I get MFG:HP , now the first two bytes are the length of the data string , and after that everything recieved is garbage ,so in all i assume that the same pattern is exhibited , only first 8 bytes recieved correctly ..

I wish to know ... is the SOF interrupt generated after 8 bytes data transfer ..and then do i have to change the BDT even odd setting , I am guessing .
And also i read something about the max packet size to 64 ...

I am using PIC32MX series .

Thanks in advance .
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…