EmbeddedRelated.com
Forums

USB Breakout

Started by }{ February 13, 2008
In article <7%Gsj.95114$3m6.80534@fe2.news.blueyonder.co.uk>,=20
snoozegroup@blueyonder.co.uk says...
>=20 > "Arlet Ottens" <usenet+5@c-scape.nl> wrote in message=20 > news:47b3335e$0$85778$e4fe514c@news.xs4all.nl... > > }{ wrote: > >> I am planning a project and would appreciate any guidance you guys cou=
ld=20
> >> give. > >> > >> At the moment, I have a measurement device connected to a decoder box =
-=20
> >> the decoder box is connected to another PCB using a USB cable. > >> > >> If practical, I would like to break into the USB cable running between=
=20
> >> the decoder box and the PCB to modify the values on the fly.=20 > >> Specifically, if two digits(say char 5 and char 6) are the same, a 1=
=20
> >> would be appended, otherwise a 0 would be appended. > >> > >> So if 123456789 were transmitted from the decoder, I would like to=20 > >> intercept and change it to 1234567890. > >> > >> Likewise if 123455789 were transmitted, I would change this to 1234557=
891=20
> >> and send on. > >> > >> I have some experience programming PICs and RS232 but no experience us=
ing=20
> >> USB(2 in this case). > >> > >> Initially, I was thinking about using a PIC with a USB input connected=
to=20
> >> the decoder, the same connected to the PCB and SPI between the two PIC=
s.
> >> > >> Firstly, is this possible, and do you have any pointers on PICs & USB2=
.
> > > > Interrupting a USB cable, and inserting USB devices like you suggested =
is=20
> > pretty much impossible. > > > > What's the purpose of this exercise ? > > >=20 > I have a machine that can accept data and perform as follows, if char 5 =
=3D=3D=20
> char 6 then do something. The new machine cannot do this, but can do, if=
=20
> char =3D=3D 1 then do something. >=20 > It was a f**k up between 2 departments in my work that will cost in exces=
s=20
> of =A315,000 to put right by getting custom software and additional=20 > hardware(which would double the machines size), or hopefully =A310 for a=
=20
> couple of PICs. >=20
If this is a one-of-a-kind fix, perhaps you can intercept the data=20 before it gets to the USB device and modify the data there. There's a reason you need an XActo knife and wire-wrap wire in your toolkit! Insert the PIC chip of your choice and modify the data stream before it gets to the USB chip. If you have to fix a production run of 1000+ units, you're probably=20 best off redoing the software. Mark Borgerson
On Feb 13, 12:05 pm, Rich Webb <bbew...@mapson.nozirev.ten> wrote:
> On Wed, 13 Feb 2008 12:14:02 -0700, donald <Don...@dontdoithere.com> > wrote: > > > > >}{ wrote: > >> "donald" <Don...@dontdoithere.com> wrote in message > >>news:t5idnTduXJW5oy7anZ2dnUVZ_g-dnZ2d@comcast.com... > [snip...snip...] > >> I was hoping that one of the micros could be master and one slave > > >Sorry about that, Microchip does not make _any_ master devices in a PIC > >chip. > > >I don't even think Microchip make any master parts at all. > > >There are master chips out there, however the cheapest way to get this > >done, the with =A315,000. > > Atmel has a branch of their AVR processors that implement "reduced > host" functionality. From the app note: > > "AT90USBxxx parts can operate both as USB device or USB host, > accurately in host mode AT90USBxxx operates as reduced host > controller. A reduced host controller has a unique USB port and does > not handle full USB tree with hub. It means that a reduced host > controller is designed to handle a unique point to point connection > with a unique USB device. A reduced host application supports a known > targeted device list (VID/PID list). Only the devices listed within > this list are supported by the application. In addition the AT90USBxxx > USB software library is able to support a targeted list of > CLASS/SUBCLASS/PROTOCOL."
Yes, it's doable. But it's a good size project by itself.
> > So the OP's solution might be achievable. Mouser, Newark, and Digkey > have the chips and dev kits.
You can use an At90USB162 ($3 USB device) talking to an At90USB646 ($8 USB master).
> > I haven't worked with any of these (I mostly use the plain AVRs and > their CAN relatives), so this is just a pointer, not an endorsement. > > >( I hate seeing projects like this go so far before someone finally > >catches on ) > > Amen!
That's why we get work fixing other people's problems.
}{ <snoozegroup@blueyonder.co.uk> wrote:
> It was a f**k up between 2 departments in my work that will cost in excess > of &#4294967295;15,000 to put right by getting custom software and additional > hardware(which would double the machines size), or hopefully &#4294967295;10 for a > couple of PICs.
If your company is big enough to have 2 departments that can't talk to each other properly then it's big enough to lose the &#4294967295;15,000 and learn a salient lesson from the ordeal, surely? Nobby
> > I have a machine that can accept data and perform as follows, if char 5 == > char 6 then do something. The new machine cannot do this, but can do, if > char == 1 then do something. >
Just curious - what kind of machines are these? Seems odd to have such specific behaviour in what sounds like relatively expensive equipment. I agree with the other poster that modifying the data stream with a micro would best be done at some other spot than USB, if possible. Andrew
On Feb 13, 3:04=A0pm, donald <Don...@dontdoithere.com> wrote:

> I would like to use a USB stick on a project.
That application is specifically why they implemented it.
andrew queisser wrote:

> I agree with the other poster that modifying the data stream with a micro > would best be done at some other spot than USB, if possible. > > Andrew
I'll do a me-2 on that one, however here are some ideas for USB hosts: http://www.dontronics-shop.com/USB-Host-p-1-c-380.html Don... -- Don McKenzie Affiliate Program: http://www.dontronics.com/affiliate Site Map: http://www.dontronics.com/sitemap E-Mail Contact Page: http://www.dontronics.com/email No More Damn Spam: http://www.wizard-of-oz.com Parallax Propeller Powered .96" OLED module http://tinyurl.com/2vr2gr
In article <13r6kv5k2cml0e4@corp.supernews.com>, Nobody Here says...
> }{ <snoozegroup@blueyonder.co.uk> wrote: > > It was a f**k up between 2 departments in my work that will cost in excess > > of &#4294967295;15,000 to put right by getting custom software and additional > > hardware(which would double the machines size), or hopefully &#4294967295;10 for a > > couple of PICs. > > If your company is big enough to have 2 departments that can't talk to each > other properly then it's big enough to lose the &#4294967295;15,000 and learn a > salient lesson from the ordeal, surely?
Including, maybe, to use something less inheritly master slave. Maybe even a protocol readily available like say ethernet. Robert -- Posted via a free Usenet account from http://www.teranews.com
"}{" <snoozegroup@blueyonder.co.uk> skrev i meddelandet
news:BOFsj.95097$3m6.47865@fe2.news.blueyonder.co.uk...
>I am planning a project and would appreciate any guidance you guys could >give. > > At the moment, I have a measurement device connected to a decoder box - > the decoder box is connected to another PCB using a USB cable. > > If practical, I would like to break into the USB cable running between the > decoder box and the PCB to modify the values on the fly. Specifically, if > two digits(say char 5 and char 6) are the same, a 1 would be appended, > otherwise a 0 would be appended. > > So if 123456789 were transmitted from the decoder, I would like to > intercept and change it to 1234567890. > > Likewise if 123455789 were transmitted, I would change this to 1234557891 > and send on. > > I have some experience programming PICs and RS232 but no experience using > USB(2 in this case). > > Initially, I was thinking about using a PIC with a USB input connected to > the decoder, the same connected to the PCB and SPI between the two PICs. > > Firstly, is this possible, and do you have any pointers on PICs & USB2. > > Thanks. >
You could conceivably put an MCU with a USB host and a USB device in between, and let the MCU process the packet before sent out/in to the downstream device. There will be some latency involved, but that may or may not be a problem. If it is a one off project, you could get an AT91SAM9260 board with a device and a host somewhere, maybe at www.olimex.com. -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
Ulf Samuelsson wrote:

> You could conceivably put an MCU with a USB host and a USB device > in between, and let the MCU process the packet before sent out/in to > the downstream device. > > There will be some latency involved, but that may or may not be a problem. > If it is a one off project, you could get an AT91SAM9260 board > with a device and a host somewhere, maybe at www.olimex.com.
SAM9-L9260 DEVELOPMENT BOARD FOR AT91SAM9260 MICROCONTROLLER Olimex hasn't got them yet Ulf. :-( Nice looking board. I tried to order a bunch recently but no luck. Give him a couple of months I think. Cheers Don... -- Don McKenzie Affiliate Program: http://www.dontronics.com/affiliate Site Map: http://www.dontronics.com/sitemap E-Mail Contact Page: http://www.dontronics.com/email No More Damn Spam: http://www.wizard-of-oz.com Parallax Propeller Powered .96" OLED module http://tinyurl.com/2vr2gr
}{ wrote:
> "Arlet Ottens" <usenet+5@c-scape.nl> wrote in message > news:47b3335e$0$85778$e4fe514c@news.xs4all.nl... >> }{ wrote: >>> I am planning a project and would appreciate any guidance you guys could >>> give. >>> >>> At the moment, I have a measurement device connected to a decoder box - >>> the decoder box is connected to another PCB using a USB cable. >>> >>> If practical, I would like to break into the USB cable running between >>> the decoder box and the PCB to modify the values on the fly. >>> Specifically, if two digits(say char 5 and char 6) are the same, a 1 >>> would be appended, otherwise a 0 would be appended. >>> >>> So if 123456789 were transmitted from the decoder, I would like to >>> intercept and change it to 1234567890. >>> >>> Likewise if 123455789 were transmitted, I would change this to 1234557891 >>> and send on. >>> >>> I have some experience programming PICs and RS232 but no experience using >>> USB(2 in this case). >>> >>> Initially, I was thinking about using a PIC with a USB input connected to >>> the decoder, the same connected to the PCB and SPI between the two PICs. >>> >>> Firstly, is this possible, and do you have any pointers on PICs & USB2. >> Interrupting a USB cable, and inserting USB devices like you suggested is >> pretty much impossible. >> >> What's the purpose of this exercise ? >> > > I have a machine that can accept data and perform as follows, if char 5 == > char 6 then do something. The new machine cannot do this, but can do, if > char == 1 then do something. > > It was a f**k up between 2 departments in my work that will cost in excess > of &#4294967295;15,000 to put right by getting custom software and additional > hardware(which would double the machines size), or hopefully &#4294967295;10 for a > couple of PICs. > > Regards > >
As they said you can not just splice in. The slave side is easy Microchip ( and many others ) has chips for that. The Host side you could use a FTDI Vinculum. But you will have to deal with the driver code if it is not a standard device.