Searching \ for '[PIC] 18F as a host and USB datalogging' 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/memory.htm?key=data
Search entire site for: '18F as a host and USB datalogging'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] 18F as a host and USB datalogging'
2006\11\04@015817 by Jinx

face picon face
Part of a project involves using the 18F4550 as a USB peripheral
to a PC. I've now been asked to provide a second USB port to
send data to a USB memory device (eg flash drive) for datalogging

1) is it at all possible to bit-bang USB out of other pins ?

2) if not, the client has dug up this i/f chip and asked for samples

http://www.vinculum.com/prd_vnc1l.html

Datasheet, 800kB

http://www.vinculum.com/documents/DS_VNC1L-1A_v095.pdf

If it doesn't involve a lot of new-and-strange-MCU coding for me,
that's good. Basically it seems to be a stand-alone IC with ability
to re-flash the ROM with a any OS you care to write

Any experiences in this area anyone ?

TIA

===============================================
If you aren't part of the solution, you're part of the precipitate

2006\11\04@021538 by Shawn Wilton

picon face
There was discussion on here a few weeks ago about that Vinculum chip.
Mostly people praising the appropriate god there was a host controller
available from FTDI...

Without knowing what the primary use of the USB port is, can you not add
both functions via the same chip?  I thought the 18F4550 was capable of that
(but then I was just glancing through the DS).

I don't imagine you can bit bang USB just because of the speeds required.
Even if you had the speed, I would not recommend it.  The timing is very
tight.

Could add a second 4550 to your board...?  If you're already connected to
the PC, then why not use it to send the data to the flash drive for logging?



On 11/3/06, Jinx <spam_OUTjoecolquittTakeThisOuTspamclear.net.nz> wrote:
{Quote hidden}

> -

2006\11\04@022012 by Jinx

face picon face
PS, I wrote

1) is it at all possible to bit-bang USB out of other pins ?

I realise anything is possible, but the true cost of rolling your
own bit-bang code may not be worth it, in terms of time spent
and project delays etc

2006\11\04@024213 by Jinx

face picon face
> There was discussion on here a few weeks ago about that Vinculum
> chip. Mostly people praising the appropriate god there was a host
> controller available from FTDI...

Thanks Shawn. Having looked that thread up I now remember the
other chips mentioned and had looked at a couple independently. I
hadn't remembered the Vinculum

> Without knowing what the primary use of the USB port is, can you
> not add both functions via the same chip?  I thought the 18F4550 was
> capable of that (but then I was just glancing through the DS)

I think all micros are peripheral only. That's why host controllers are
now starting to appear for embedded applications

> I don't imagine you can bit bang USB just because of the speeds
> required. Even if you had the speed, I would not recommend it.  The
> timing is very tight

Can't say I'm too keen on that idea anyway. If there's a chip to do it
via UART or SPI, I'd go for it

> Could add a second 4550 to your board...?  If you're already
> connected to the PC, then why not use it to send the data to the
> flash drive for logging?

Datalogging is for a unit that stays out in the field. Data will be
transported in a pluggable memory device

I've taken a look at Microchip's AN1003, which describes i/f with
a memory card, rather than a flash drive. That would probably do
for a one-off or different application, but the intention is to go
commercial, and I think USB devices are more common than flash
cards. Besides, the client has specified USB so that's what I'll be
doing

2006\11\04@024221 by John Temples

flavicon
face
On Sat, 4 Nov 2006, Jinx wrote:

> 1) is it at all possible to bit-bang USB out of other pins ?
>
> I realise anything is possible, but the true cost of rolling your
> own bit-bang code may not be worth it, in terms of time spent
> and project delays etc

No, it is not possible, no matter how much time and money you have.
The full-speed USB bit rate is equal to the fastest PIC's instruction
clock.  I doubt it would even be possible to bit-bang low speed USB.

--
John W. Temples, III

2006\11\04@024412 by John Temples

flavicon
face
On Sat, 4 Nov 2006, Jinx wrote:

> Part of a project involves using the 18F4550 as a USB peripheral
> to a PC. I've now been asked to provide a second USB port to
> send data to a USB memory device (eg flash drive) for datalogging

Why not use an SD card or MMC for the logging?  That is easily managed
along with USB in a PIC.

--
John W. Temples, III

2006\11\04@053704 by Mike Harrison

flavicon
face
On Fri, 3 Nov 2006 23:42:16 -0800 (PST), you wrote:

>On Sat, 4 Nov 2006, Jinx wrote:
>
>> 1) is it at all possible to bit-bang USB out of other pins ?
>>
>> I realise anything is possible, but the true cost of rolling your
>> own bit-bang code may not be worth it, in terms of time spent
>> and project delays etc
>
>No, it is not possible, no matter how much time and money you have.
>The full-speed USB bit rate is equal to the fastest PIC's instruction
>clock.  I doubt it would even be possible to bit-bang low speed USB.

Someone has managed to do low-speed USB peripheral bit-banged on an AVR, but it uses so much CPU
resource that you can't do much more than transfer data to onboard hardware peripherals - UART etc.
so although a clever achievement, not actually very useful in any but a few very specific
applications.
Do a web search for 'igorplug' for more info


2006\11\04@055950 by Jinx

face picon face
> Do a web search for 'igorplug' for more info

Found the author's page

http://www.cesko.host.sk/IgorPlugUSB/IgorPlug-USB%20(AVR)_eng.htm

Thought all he had on Desktop was Recycle Bin as a black hole !! ;-)

Although he's shown it can be done with just a modest micro, not
sure if that's an adventure I want to set off on. Even with a Scenix.
The Vinculum looks like the business for now



2006\11\04@064841 by Wouter van Ooijen

face picon face
> No, it is not possible, no matter how much time and money you have.
> The full-speed USB bit rate is equal to the fastest PIC's instruction
> clock.  I doubt it would even be possible to bit-bang low speed USB.

http://www.obdev.at/products/avrusb/index.html

Wouter van Ooijen

-- -------------------------------------------
Van Ooijen Technische Informatica: http://www.voti.nl
consultancy, development, PICmicro products
docent Hogeschool van Utrecht: http://www.voti.nl/hvu


2006\11\04@065328 by Mat

flavicon
face
Again also this is very clever, it does not do USB host, which is
significantly more complex then client code, and currently not possible
using the PIC's without an external USB host IC.

Mat

{Original Message removed}

2006\11\06@082127 by Alan B. Pearce

face picon face
>> I realise anything is possible, but the true cost of rolling your
>> own bit-bang code may not be worth it, in terms of time spent
>> and project delays etc
>
>No, it is not possible, no matter how much time and money you have.
>The full-speed USB bit rate is equal to the fastest PIC's instruction
>clock.  I doubt it would even be possible to bit-bang low speed USB.

I think there is an app note for bit banging USB on an AVR processor. Let me
look at my library.

Yes, here we go - AVR309 Software Universal Serial Bus, doc 2556. Supports
low speed (1.5Mbit/s), implementation runs on small AVR devices (2kB and up)
and has full Windows USB driver, DLL library functions and demonstration app
in Delphi available for download.Scanning through it, there is some good
looking theory on USB, and example circuits using AT90S2313/ATtiny2313 and
ATmega8 The copy I have is preliminary, dated 07/05.

http://www.atmel.com/dyn/resources/prod_documents/doc2556.pdf is a later
issue I just downloaded, dated 02/06, and no longer preliminary.

2006\11\06@114243 by M. Adam Davis

face picon face
On 11/4/06, Jinx <.....joecolquittKILLspamspam@spam@clear.net.nz> wrote:
> Part of a project involves using the 18F4550 as a USB peripheral
> to a PC. I've now been asked to provide a second USB port to
> send data to a USB memory device (eg flash drive) for datalogging
>
> 1) is it at all possible to bit-bang USB out of other pins ?

Someone has demonstrated USB device bit-banging using an AVR, but the
speed is the low speed (around 1.5mbits/s) suitable for keyboard or
mouse use, but not much else.

Bit banging USB host at slow speed is possible, but the software to
support the host side of the USB protocol is non-trivial.  But like
TCP/IP, I expect open source USB stacks to start moving into the
microcontroller space soon enough.

I doubt your USB memory stick will operate at low speed though.  They
typically work on 12mbits/s (full speed) or 480mbits/s (high speed).
Maybe the USB on-the-go spec covers running them at low speed?

At any rate, it's a lot more work than I expect you are interested in doing.

-Adam

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - -
Moving in southeast Michigan? Buy my house: http://ubasics.com/house/

Interested in electronics? Check out the projects at http://ubasics.com

Building your own house? Check out http://ubasics.com/home/

2006\11\06@120555 by Alan B. Pearce

face picon face
>I doubt your USB memory stick will operate at low speed though.  They
>typically work on 12mbits/s (full speed) or 480mbits/s (high speed).
>Maybe the USB on-the-go spec covers running them at low speed?

I don't see why it shouldn't run low speed - after all the high speed and
full speed modes are really there just to deal with our human grumpiness at
being kept waiting for a perceivable time while a file transfer takes place.

Certainly a memory stick I have works in a USB 1.1 hub, although Windows
insists in telling me that it "really would work a lot better in a USB 2
port ...."

2006\11\06@121626 by Michael Rigby-Jones

picon face


>-----Original Message-----
>From: piclist-bouncesspamKILLspammit.edu [.....piclist-bouncesKILLspamspam.....mit.edu]
>Sent: 06 November 2006 16:43
>To: Microcontroller discussion list - Public.
>Subject: Re: [PIC] 18F as a host and USB datalogging
>
>
>On 11/4/06, Jinx <EraseMEjoecolquittspam_OUTspamTakeThisOuTclear.net.nz> wrote:
>> Part of a project involves using the 18F4550 as a USB
>peripheral to a
>> PC. I've now been asked to provide a second USB port to send
>data to a
>> USB memory device (eg flash drive) for datalogging
>>
>> 1) is it at all possible to bit-bang USB out of other pins ?
>
>Someone has demonstrated USB device bit-banging using an AVR,
>but the speed is the low speed (around 1.5mbits/s) suitable
>for keyboard or mouse use, but not much else.

How about a bit-bashed USB slave on the venerable 16F84?

http://www.telefonica.net/web2/hidlcd/

Ok, so it had to be overclocked, and PIC isn't going to be capable of doing much else but it's a pretty impressive hack IMO.

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.
=======================================================================

2006\11\06@124307 by Mat

flavicon
face
Very impressive indeed :-), its still an entirely new game to bitbash a host
though, compared to bitbashing a slave, which in its self is not something I
would have even thought possible, until now. Good job!

Mat

{Original Message removed}

2006\11\06@163257 by Jinx

face picon face
Thanks for all the replies guys. I think at this stage, simply to keep
the project moving along, I'll go with the Vinculum IC. Seeing as
it's being sampled it would be silly not to. I've made a note of all the
bit-banged solutions posted and would like to have a go in the future,
maybe with a Scenix or 30F

2006\11\06@163842 by peter green

flavicon
face

> I don't see why it shouldn't run low speed - after all the high speed and
> full speed modes are really there just to deal with our human
> grumpiness at
> being kept waiting for a perceivable time while a file transfer
> takes place.
there was no reason to design in a fallback from full speed to low speed because full speed was part of the spec from the start.

> Certainly a memory stick I have works in a USB 1.1 hub, although Windows
> insists in telling me that it "really would work a lot better in a USB 2
> port ...."
yes high speed devices will fall back to full speed but that doesn't really help since even full speed is way to fast to bit bang.



2006\11\06@165206 by Marcel Birthelmer

picon face
I believe per the spec, a device that supports high speed is not
allowed to support low speed or something like that.

On 11/6/06, peter green <plugwashspamspam_OUTp10link.net> wrote:
{Quote hidden}

> -

2006\11\06@171220 by James Newton, Host

face picon face
> Again also this is very clever, it does not do USB host,
> which is significantly more complex then client code, and
> currently not possible using the PIC's without an external
> USB host IC.

I'm also having a difficult time convincing clients that USB Host is not the
same as USB Peripheral.

Are there actually ANY USB Host implementations in embedded devices?

---
James.


2006\11\06@172022 by Herbert Graf

flavicon
face
On Mon, 2006-11-06 at 14:12 -0800, James Newton, Host wrote:
> > Again also this is very clever, it does not do USB host,
> > which is significantly more complex then client code, and
> > currently not possible using the PIC's without an external
> > USB host IC.
>
> I'm also having a difficult time convincing clients that USB Host is not the
> same as USB Peripheral.
>
> Are there actually ANY USB Host implementations in embedded devices?

Define "embedded".

The newest media players support USB host. By media players I mean those
players that typically have either a hard drive, an ethernet connection
or a DVD drive, and play DIVX/XVID/etc format files. Some of the more
expensive ones have a USB slot to plug in a USB key for viewing
pictures.

Then there are the consumer NAS type devices. They often have a USB port
for connecting a USB hard drive or stick for access on your network.

Inside these things have pretty power processors, I'd still consider
them embedded, but certainly not the MCU type embedded! :)

TTYL

2006\11\06@172856 by Maarten Hofman

face picon face
>
> Are there actually ANY USB Host implementations in embedded devices?


Not sure if you would call it an "embedded device" but many HP printers have
an interface to get pictures from a USB flash drive. I would assume this
requires the host protocol. It is a bit funny, as it looks as if you can
plug the printer into itself, that way.

Greetings,
Maarten Hofman.

2006\11\06@173441 by Marcel Birthelmer

picon face
A good number of newer car stereos also support usb sticks with mp3s.
- Marcel

> > Are there actually ANY USB Host implementations in embedded devices?

2006\11\06@174921 by Rolf

face picon face
The new Tektronix scopes have the USB Flash key up front (host), and a
USB peripheral port at the back...

An oscilloscope embedded enough? Lots of printers have the USB
pict-bridge feature. Also host functionality.

Rolf

Herbert Graf wrote:
{Quote hidden}

2006\11\06@183508 by Mat

flavicon
face
They are OTG usb, not a full usb host, they only support limited features
and devices.

Mat

-----Original Message-----
From: Maarten Hofman [@spam@cashimorKILLspamspamgmail.com]
Sent: 06 November 2006 22:29
To: Microcontroller discussion list - Public.
Subject: Re: [PIC] 18F as a host and USB datalogging

>
> Are there actually ANY USB Host implementations in embedded devices?


Not sure if you would call it an "embedded device" but many HP printers have
an interface to get pictures from a USB flash drive. I would assume this
requires the host protocol. It is a bit funny, as it looks as if you can
plug the printer into itself, that way.

Greetings,
Maarten Hofman.

2006\11\06@184920 by Marcel Birthelmer

picon face
Actually a number of printers have both Mass Storage and PTP (for
PictBridge) host mode implementations.
- Marcel

On 11/6/06, Mat <KILLspamlistKILLspamspampiccoder.co.uk> wrote:
> They are OTG usb, not a full usb host, they only support limited features
> and devices.
>
> Mat
>
> {Original Message removed}

2006\11\06@193436 by peter green

flavicon
face

> They are OTG usb,
no, most printers have seperate ports for the PC and the camera, OTG is a system for running both on one port.

> not a full usb host, they only support limited features
> and devices.
but is it just the software/firmware that only supports limited devices (i stronly suspect it is).



2006\11\06@202119 by William Chops Westfield

face picon face

On Nov 6, 2006, at 2:12 PM, James Newton, Host wrote:

> Are there actually ANY USB Host implementations in embedded devices?
>
What do you consider an "embedded device" ?  USB host support was
added to cisco routers somewhat recently, aimed at being able to
use USB crypto keys and flash storage.  I believe we're mostly using
Philips (NXP?) chipsets that implement most of the host functionality.
A couple of the larger microcontrollers are starting to include host
functionality. there's an Atmel 8051 and maybe an AVR, some of the
SIlabs 8051s, and things in the Dragonball class and upward...

BillW

2006\11\06@215059 by John Chung

picon face
I remember in the list there was a chip you can use
for USB HOST which you can use easily with PIC. I
can't remember which manufacturer.

John

--- Marcel Birthelmer <RemoveMEmarcelb.listsTakeThisOuTspamgmail.com> wrote:

> A good number of newer car stereos also support usb
> sticks with mp3s.
> - Marcel
>
> > > Are there actually ANY USB Host implementations
> in embedded devices?
> --

2006\11\07@043829 by Mike Harrison

flavicon
face
On Mon, 6 Nov 2006 18:50:57 -0800 (PST), you wrote:

>I remember in the list there was a chip you can use
>for USB HOST which you can use easily with PIC. I
>can't remember which manufacturer.

Philips and Maxim do USB host interface chips - Maxim is SPI, not looked at the Philips one. I think
Maxim have a variant that does host and peripheral for OTG applications.
Might end up using a lot of the PIC's code space to support them though - something like an ARM is
probably more appropriate.
I'd think you'd need to be making a LOT of units before the additional cost of the Vinculum chip
outweighed the development time to use anything else.


>John
>
>--- Marcel Birthelmer <spamBeGonemarcelb.listsspamBeGonespamgmail.com> wrote:
>
>> A good number of newer car stereos also support usb
>> sticks with mp3s.
>> - Marcel
>>
>> > > Are there actually ANY USB Host implementations
>> in embedded devices?
>> --

2006\11\07@043934 by Mike Harrison

flavicon
face
On Mon, 6 Nov 2006 18:50:57 -0800 (PST), you wrote:

>I remember in the list there was a chip you can use
>for USB HOST which you can use easily with PIC. I
>can't remember which manufacturer.

Philips and Maxim do USB host interface chips - Maxim is SPI, not looked at the Philips one. I think
Maxim have a variant that does host and peripheral for OTG applications.
Might end up using a lot of the PIC's code space to support them though - something like an ARM is
probably more appropriate.
I'd think you'd need to be making a LOT of units before the additional cost of the Vinculum chip
outweighed the development time to use anything else.


>John
>
>--- Marcel Birthelmer <TakeThisOuTmarcelb.listsEraseMEspamspam_OUTgmail.com> wrote:
>
>> A good number of newer car stereos also support usb
>> sticks with mp3s.
>> - Marcel
>>
>> > > Are there actually ANY USB Host implementations
>> in embedded devices?
>> --

2006\11\07@092355 by William Couture

face picon face
On 11/6/06, Michael Rigby-Jones <RemoveMEMichael.Rigby-JonesspamTakeThisOuTbookham.com> wrote:
>
> How about a bit-bashed USB slave on the venerable 16F84?
>
> http://www.telefonica.net/web2/hidlcd/
>
> Ok, so it had to be overclocked, and PIC isn't going to be capable of doing much else
> but it's a pretty impressive hack IMO.

Neat!

However, while I see the schematic, I don't see the source code.  I'm always
somewhat skeptical when I see something so "out there" and no way to verify
that it's really doing what it says it's doing (like the iPic
"webserver" based on
the 12C509).

Bill

--
Psst...  Hey, you... Buddy...  Want a kitten?  straycatblues.petfinder.org

2006\11\14@142013 by alan smith

picon face
There is a device out there that can copy one usb stick to another (I thought...wow...great idea...I should do that...) but they are on the market already.  So it has to act like a host in order to read from the device being copied?

Herbert Graf <mailinglist3EraseMEspam.....farcite.net> wrote:  On Mon, 2006-11-06 at 14:12 -0800, James Newton, Host wrote:
> > Again also this is very clever, it does not do USB host,
> > which is significantly more complex then client code, and
> > currently not possible using the PIC's without an external
> > USB host IC.
>
> I'm also having a difficult time convincing clients that USB Host is not the
> same as USB Peripheral.
>
> Are there actually ANY USB Host implementations in embedded devices?

Define "embedded".

The newest media players support USB host. By media players I mean those
players that typically have either a hard drive, an ethernet connection
or a DVD drive, and play DIVX/XVID/etc format files. Some of the more
expensive ones have a USB slot to plug in a USB key for viewing
pictures.

Then there are the consumer NAS type devices. They often have a USB port
for connecting a USB hard drive or stick for access on your network.

Inside these things have pretty power processors, I'd still consider
them embedded, but certainly not the MCU type embedded! :)

TTYL

2006\11\14@145008 by peter green

flavicon
face

> There is a device out there that can copy one usb stick to
> another (I thought...wow...great idea...I should do that...) but
> they are on the market already.  So it has to act like a host in
> order to read from the device being copied?
well it needs to act as a host to communicate to the usb sticks (which are both devices)

considered buying one, ripping it open and finding out what chips they use (assuming they were nice enough not to file the part numbers off)? ;)


2006\11\14@174754 by Howard Winter

face
flavicon
picon face
Peter,

On Tue, 14 Nov 2006 19:31:36 -0000, peter green wrote:

>
> > There is a device out there that can copy one usb stick to
> > another (I thought...wow...great idea...I should do that...) but
> > they are on the market already.  So it has to act like a host in
> > order to read from the device being copied?
> well it needs to act as a host to communicate to the usb sticks (which are both devices)
>
> considered buying one, ripping it open and finding out what chips they use (assuming they were nice enough not to file the part numbers off)? ;)

I have such a thing - a disk drive enclosure that can be connected to a PC and used as an external drive, or by flicking a switch it can be connected
to a digital camera to download photos onto the drive, so it's acting in both USB roles.  It has a Female A USB socket, and comes with a male A to
male A cable to connect to a PC, you use the camera's normal cable for connecting that.

I've just taken it apart, and the chips I can see are:

Labelled "Ali",  M5624H  A1,  0519  TH07,  XHGSH100000E

Labelled "SST",  39FV010,  70-4C-WH,  0502053-G

Labelled "Hitek", EP2084-010

There's a 12MHz crystal and what looks like a voltage regulator, the rest is just passives.

Hope this helps someone!

Cheers,


Howard Winter
St.Albans, England


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