They sort items according to a read in barcode. The story goes like this
My customer has some top of the range machines(250,000 - 750,000) from my division Decided to buy another machine with less capability( I agree with the other poster that modifying the data stream with a micro
This may be my last option before giving up on this one, Thanks for all your help guys.
Ulf Samuelsson wrote about someone's need to diddle the contents of a data stream between a USB host and device:
Probably OK as long as the bandwidth isn't approaching the limit and you're not worried about isochronous transfers.
The Cypress EZ-Host (CY7C67300) and EZ-OTG (CY7C67200) also come to mind, for compact, low-cost solutions. They each have two USB SIEs that can each be configured as device or host. They can boot from an I2C EEPROM. The main drawback is that they use the Cypress CY16 core, so there aren't many choices for development tools. On the other hand, they're very inexpensive.
The USB part of the RS232 converter has to connect to a PC or other host device that can handle all the enumeration and control signals. IIRC, the device described by the OP, has only one host and one slave device---not the two hosts your converters would require.
I think you'd still have to program the PIC and AVR. I don't know how hard it is to get the AVR to mimic the host to which the device is to be connected. Still looks to be more complex than intercepting the signals outside the USB chain.
It wouldn't work anyway except in the most specific of cases. Assuming that speed is not a restriction, which itself is a big if, USB and RS232 are fundamentally different protocols. USB has multiple transfer modes and multiple endpoints defined even for a simple link between host and device with no hubs involved. RS232 doesn't, and you can't add these on with a regular USBRS232 interface chip because it simply isn't what the devices are designed to do. Added to that such a hack would appear to the host to be a USB RS232 port, not whatever device it is you need to interface to.
The only time I can see this approach working is if the device itself uses an RS232USB interface internally which is at least possible, but in that case you have your entry point there - break into the signals at the RS232 stage within the device itself.
I don't really have any suggestions in the general case though. A device to do what the OP wants would have more in common with a hub than anything else, but again this isn't what your standard off-the-shelf hub designs are designed to do and I doubt they could be adapted to serve this particular purpose.
I doubt that any COTS USB hub chip would have this functionality, but if you could get a hub as an ASIC core, you could add the necessary "breakout" processing. A hub is already able to connect to a host upstream and multiple devices downstream. AFAIK, a hub simply passes data through with no buffering, so any "breakout" decision has to be made at full bus speed. Just buying the core IP is probably a 4 or 5 figure NRE. Bringing your knowledge from PIC/RS232 up to ASIC design is certainly another 5 or 6 figures.
Of course, the engineering solution is to fix the software, not kludge the hardware.