I was wondering how the computer determine the connected hardware -through USB- whether it is a mouse ,a keyboard or a camera etc... I opened a mouse and I couldn't find any thing that can identify the device , no microcontroller and no memory !!! so how ?!! thx in advance
I don't know what mouse you looked at, but USB devices have descriptors which are stored in ROM on the device. When the device is connected, it sends the device descriptor to the host PC, which contains the USB version, packet size, and vendor/product IDs, among other information.