On 19 Sep 2003 at 14:16, Tom wrote: > I'm using the FTDI USB chips interfacing to a PIC to move into the "USB > present" from the "RS232 past". > > Everything works correctly - most of the time. But every once in a while > when plugging in a USB cable, Windows decides it's not a 232 port this > time; rather, it thinks I've just plugged a serial mouse into the port. My > PIC program is sending ascii data but Windows interprets it as mouse > commands and everything on the screen begins taking on a life of it's own. > The real mouse still works but can't keep control. If the system isn't > stopped quickly, "Very Bad" things will occur. Like icons on the desktop > moved all around, various settings changed and so on. > > Does anyone know what causes this to occur and what can be done to prevent it? I've had that occur when the micro was sending a continuous stream of data before the FTDI device had been enumerated. The symptoms were exactly the same - haunted icons, etc. The continuous stream was intentional but not waiting for the USB connection wasn't. If that might be happening in your situation, try waiting for a character first or use the PWREN signal to show that all the household chores are done before sending data. The ironic thing is that now the customer wants the peripheral to appear as a mouse on occassion and I can't figure out how to go about doing it for a low volume product. Steve. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics