??? 07/12/06 17:32 Read: times |
#120115 - Doesn't seem to hard Responding to: ???'s previous message |
Onyau Chan said:
Did anyone know how to auto-detect USB and PS2? I have a project to build a dual interface keyboard using normal 8051 MCU and a Philips SIE, PDIUSBD12. I can use any 2 pin to do the PS2 interface. The first step needs to detect the interface. If it is USB, I will enable the SIE. Otherwise, the SIE will remain disabled. Did anyone know how to detect the USB signal with MCU? The PS/2 protocol uses one line as data and the other as a clock. The USB protocol uses differential signals which means you would expect one line to be the inverse of the other. The nature of the two protocols and what you'd expect to see on the two lines is very different. You should be able to detect them by just looking at those two lines and detecting what's coming in. If you see the two input lines moving together but inversely, it's most likely USB. If the two lines are moving independently and not necessarily inversely, it's probably PS2. That said, are you really going to try to bit-bang USB? Sounds like a mess. Regards, Craig Steiner |