摘要:
A method and system that enables real-time peripheral devices to be connected to a computer system utilizing Universal Serial Bus architecture. The present invention empowers the computer system to perform an accurate determination of the moment in time a predetermined event occurred within a real-time peripheral device by utilizing the start of frame pulse transmitted from a USB host controller to peripheral devices connected to it. When a predetermined event occurs within a peripheral device, a first timer within the peripheral device starts incrementing to determine the amount of time that elapses until the next start of frame occurs. Once the next start of frame occurs, the first timer stops incrementing and stores the time before start of frame value. Every start of frame pulse causes a second timer located within the USB host controller to start incrementing. The USB host controller interrogates the peripheral device which transfers data to the host controller indicating that (1) an event occurred and (2) the time before start of frame value of the first timer. The USB host controller interrupts the host processor and transfers it the data related to the peripheral device. The processor retrieves the time after start of frame value from the second timer and sums it with the time before start of frame value of the first timer resulting in the time after event value, which is the elapsed time since the predetermined event occurred and the processor read the second timer.