Searching \ for '[PIC]: USB master using PIC' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'USB master using PIC'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: USB master using PIC'
2003\07\03@030705 by David Huisman

flavicon
face
I am investigating using a PIC to program store data onto a USB memory
stick.

It seems straight forward when using the PIC and say FDTI USB-232
convertor as a slave device (such as USB modem application), but I am
not sure on what is involved in using the PIC as a master to write to a
USB slave device. I assume it is similar to writing to other media (such
as a floppy disk) from an 8-bit micro.

Any information appreciated.

TIA


Kind Regards

David Huisman

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@051133 by Bob Axtell

face picon face
I'm dabbling in this now, using an SL811HS in host mode to talk to a USB
Flashkey. I'm trying to work out the algorithms in a higher level language
(Delphi [Pascal]) then convert the controls to PIC.

--Bob

At 05:09 PM 7/3/2003 +1000, you wrote:
{Quote hidden}

---------------
NOTICE

1. This account can accept email & attachments up to 10M in size.
2. Federal Monitors: At request of client, some attachments are encrypted.
Please DO NOT delay traffic; please reply with credentials for password.
--------------

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@051144 by hael Rigby-Jones

picon face
> -----Original Message-----
> From: David Huisman [SMTP:spam_OUTDavidTakeThisOuTspamBRAMCO.COM.AU]
> Sent: Thursday, July 03, 2003 8:09 AM
> To:   .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Subject:      [PIC]: USB master using PIC
>
> I am investigating using a PIC to program store data onto a USB memory
> stick.
>
> It seems straight forward when using the PIC and say FDTI USB-232
> convertor as a slave device (such as USB modem application), but I am
> not sure on what is involved in using the PIC as a master to write to a
> USB slave device. I assume it is similar to writing to other media (such
> as a floppy disk) from an 8-bit micro.
>
> Any information appreciated.
>
> TIA
>
Implementing a USB master is extremely complicated, and probably not
something that could be done purely with a PIC I suspect (search in the
archives, this has been discussed a few times before).  Your life would be
*much* simpler if you ignored the USB drives and used one of the flash
memory cards e.g. compact flash, smartmedia, MMC.  Many of the MMC cards
have an SPI mode to make interfacing with a micro easier.

Mike


=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
Any questions about Bookham's E-Mail service should be directed to postmasterspamKILLspambookham.com.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@051957 by Orbit Communications

flavicon
face
Thanks for the feedback. I suspected there was a bit involved. There seems
to be plenty of support for compact flash, I may investigate this.

Kind Regards

David Huisman ----- Original Message -----
From: "Michael Rigby-Jones" <.....Michael.Rigby-JonesKILLspamspam.....BOOKHAM.COM>
To: <EraseMEPICLISTspam_OUTspamTakeThisOuTMITVMA.MIT.EDU>
Sent: Thursday, July 03, 2003 5:28 PM
Subject: Re: [PIC]: USB master using PIC


> > {Original Message removed}

2003\07\03@081214 by Olin Lathrop

face picon face
> It seems straight forward when using the PIC and say FDTI USB-232
> convertor as a slave device (such as USB modem application), but I am
> not sure on what is involved in using the PIC as a master to write to a
> USB slave device. I assume it is similar to writing to other media (such
> as a floppy disk) from an 8-bit micro.

You need to read the USB spec.  Being a master is *much* more complicated
than being a slave.


*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@081222 by Stef UCI

flavicon
face
Orbit Communications wrote:

>Thanks for the feedback. I suspected there was a bit involved. There seems
>to be plenty of support for compact flash, I may investigate this.
>
Or maybe look to the new "USB on the go",
AFAIK an new approach where a USB port can be either a slave or a
"simple master".
Stef Mientki

>
>

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@082221 by Dave VanHorn

flavicon
face
>Or maybe look to the new "USB on the go",
>AFAIK an new approach where a USB port can be either a slave or a
>"simple master".
>Stef Mientki

This is something we definitely need. Not all devices need or want a PC
involved!

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@090840 by hael Rigby-Jones

picon face
> -----Original Message-----
> From: Dave VanHorn [SMTP:dvanhornspamspam_OUTCEDAR.NET]
> Sent: Thursday, July 03, 2003 1:21 PM
> To:   @spam@PICLISTKILLspamspamMITVMA.MIT.EDU
> Subject:      Re: [PIC]: USB master using PIC
>
> >Or maybe look to the new "USB on the go",
> >AFAIK an new approach where a USB port can be either a slave or a
> >"simple master".
> >Stef Mientki
>
> This is something we definitely need. Not all devices need or want a PC
> involved!
>
>
http://www.usb.org/developers/onthego/

Regards

Mike


=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================
Any questions about Bookham's E-Mail service should be directed to KILLspampostmasterKILLspamspambookham.com.

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@112244 by Spehro Pefhany

picon face
At 08:10 AM 7/3/2003 -0400, you wrote:
> > It seems straight forward when using the PIC and say FDTI USB-232
> > convertor as a slave device (such as USB modem application), but I am
> > not sure on what is involved in using the PIC as a master to write to a
> > USB slave device. I assume it is similar to writing to other media (such
> > as a floppy disk) from an 8-bit micro.
>
>You need to read the USB spec.  Being a master is *much* more complicated
>than being a slave.

Hence the high failure rate of small businesses. ;-)

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffTakeThisOuTspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@160737 by William Chops Westfield

face picon face
I'm inclined to believe that there would be a lot of 'cheating' that you
could do if all you wanted to do was read a (single) USB FLASH disk, but
the result would likely have a fair amount of vendor-dependence.

BillW

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@173649 by Bob Axtell

face picon face
I am assuming that you are addressing me, using a Cypress SL811HS in host
mode? I appreciate any comments.

I'm inclined to think that the USB Flash disk will be a bulk memory array.
Since it is compatible under every O/S, its unlikely to vary among vendors
at all as far as the USB is concerned. Since It will be the only device on
the bus, it should register easily.

But I AM planning to avoid much of the USB software layering by simply
getting into the device and uncovering how it is arranged. It would seem to
me that it would be arranged like a FAT16 HD as far as the data is
concerned except for size. I'm planning to utilize some hacking tools
(pattern recognizing software) to locate key locations in the memory array.
For example, clear the memory of a USB flash key on a PC, then do a data
dump. Then, store a small file in it with an unusual name. Do another dump,
and locate where the name and pointers are stored, then locate the actual
data. I can't image that this is difficult. The hard part will be just
getting the USB key to respond to simple USB commands.

The SL811HS fits like a glove onto the F877's parallel port interface,
that's the reason I chose it.

--Bob

At 01:07 PM 7/3/2003 -0700, you wrote:
>I'm inclined to believe that there would be a lot of 'cheating' that you
>could do if all you wanted to do was read a (single) USB FLASH disk, but
>the result would likely have a fair amount of vendor-dependence.
>
>BillW
>
>--
>http://www.piclist.com hint: The PICList is archived three different
>ways.  See http://www.piclist.com/#archives for details.

---------------
NOTICE

1. This account can accept email & attachments up to 10M in size.
2. Federal Monitors: At request of client, some attachments are encrypted.
Please DO NOT delay traffic; please reply with credentials for password.
--------------

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@193656 by Andrew Warren

flavicon
face
Bob Axtell <spamBeGonePICLISTspamBeGonespammitvma.mit.edu> wrote:

> I'm inclined to think that the USB Flash disk will be a bulk memory
> array. .... But I AM planning to avoid much of the USB software
> layering .... store a small file in it with an unusual name. Do
> another dump, and locate where the name and pointers are stored,
> then locate the actual data. I can't image that this is difficult.
> The hard part will be just getting the USB key to respond to simple
> USB commands.

Bob:

I don't think there's any need to go to all that trouble; the USB
Mass Storage Class is described quite well in the specifications
available from:

   http://www.usb.org/developers/devclass_docs

You'll want to use the "Bulk Only" interface to talk to your flash
disk; the "CBI" interface is obsolete.

-Andy

=== Andrew Warren -- TakeThisOuTaiwEraseMEspamspam_OUTcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\03@204918 by William Chops Westfield

face picon face
   > I'm inclined to believe that there would be a lot of 'cheating' that
   > you could do if all you wanted to do was read a (single) USB FLASH
   > disk, but the result would likely be  vendor-dependent

   I am assuming that you are addressing me, using a Cypress SL811HS in
   host mode? I appreciate any comments.

No, this was aimed more at the original poster, trying to drive the USB
disk with an absolute minimum of HW and SW.


   I'm inclined to think that the USB Flash disk will be a bulk memory
   array.  Since it is compatible under every O/S, its unlikely to vary
   among vendors at all as far as the USB is concerned. Since It will be
   the only device on the bus, it should register easily.

I was thinking more along the lines of putting a logic or USB protocol
analyzer between your PC and the USB flash drive, and seeing what
"messages" are actually exchanged, rather than trying to implement the USB
specs.  You don't need hub management, or real-time capability, or
(probably) LOTS of stuff that's usually considered necessary to be a USB
master.  It's sort of the logical equivilent of using an IRDA port to do
TV infrared remote control...

THe "flash disks" I've used all show up as "USB Mass Storage Devices",
which means they look like a disk rather than a memory array (whatever THAT
means.  Probably got logical "sectors" and such.)  While I'll bet they all
use similar chips, there might be details that you'd get wrong when
cheating...

BillW

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2003\07\04@131030 by Peter L. Peres

picon face
I think that a faster Scenix cpu would have a better chance since it will
have to bit bang the interface.

Building a master for ONE slave device should not be very hard, assuming
the necessary information would be available. But it is not. So it is not
simple.

The way I see it, it could boil down to sending a few canned packets over
the physical interface for setup, followed by a pair of functions for
sending and receiving data. But this requires a lot of work if the
protocol data is unknown.

The Scenix could probably be programmed to implement the physical
interface by bit banging it. I am not sure about receiving. Transmitting
is relatively easy.

Remember the bu need not be 'enumerated' or anything if the device is
known, and I think that one could get away with the device left at its
default device designation (since there is only one of them). This might
work or might not.

Peter

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

More... (looser matching)
- Last day of these posts
- In 2003 , 2004 only
- Today
- New search...