Reading Modes.
This section describes the reading modes for analog signals, which are the same for discrete (digital) signal.
In this software two data reading modes are active:
- pipe reading
- microcontroller buffer reading
When pipe reading, the measurement process consists of the following steps:
- Set the sampling frequency.
- Start the pipe.
- Read the packets of 409 samples (512/1.25 (10 bits)) from microcontroller in real time.
- When computer reads the packet, microcontroller writes the samples to its FIFO (1024 bytes) to ensure measurement continuity.
- Extract the packets, calibration, triggering as required.
- Stop the pipe upon filling the preset buffer.
When microcontroller buffer reading, the measurement process consists of the following steps:
- Set the sampling frequency.
- Read 1126 10-bit samples (microcontroller buffer depth is 1024(xdata) + 256 (EP2) + 128 (EP1) = 1408 bytes/1.25 (10 bits) = 1126 samples) at the preset sampling frequency and their compress in the internal buffer, triggering as required.
- Notify the computer about samples obtained.
- Transmit the microcontroller buffer to the computer.
- Extract the buffer and calibrating the samples.
- Display the measurement results.
It follows that when reading with the buffer it is impossible to read more than 1126 waveform samples for one continuous measurement. It is necessary to set frequency to enable normal viewing both low and high-frequency signals. So, e.g. if the sampling frequency is always 200 KHz then when analyzing tone with frequency of 1 KHz (i.e. 200 samples for signal period) 1156/200 = 5 full signal periods would be displayed that is sufficiently and when analyzing tone with frequency of 50 Hz (i.e. 4000 samples for signal period) then less than 1/3 of period would be displayed that is unacceptable for any analysis.
The question arises why we use reading with microcontroller buffer. The reason is that not all computers are equipped with USB1.1 and NT-base operating system, i.e. Windows 2000 and XP. This is important because the NT based operating systems ensure the general process priority and processor resource allotment allows for smooth tranfer of data on USB.
As the data exchange process is continuous and run in real time, increased demands are imposed on the computer (especially on USB bus controller) and operating system.
To ensure the maximum sampling frequency when pipe reading, USB bus controller must manage to read 512 data bytes (EP3) from MK End Point each millisecond. At that rate, the operating system must allocate the necessary resources for the data reading process, i.e. generally keep the process up-to-date and the pipe priority high. If you have at least Celeron 600MHz, 128M RAM and operating system Windows 2000 or XP they have to run at maximum frequency (as tested on 3 computers). Of course if any resource-intensive application is concurrently operated. performance will suffer accordingly.
If, upon connecting the device, your computer gives an "Out of bandwidth" error message, you can operate at the maximum sampling frequency, partly because of low-speed computer and partly because of the device capabilities. In this case the microcontroller buffer reading mode can help you as in this mode the maximum sampling frequency is independent on the features of your computer.
But you can use the pipe reading even in the low-speed computers when selecting the maximum sampling frequency by experiment and if more it will be the automatic buffer reading as, e.g. in Celeron 300MHz, 64M Windows 98, the pipe reading run at Fs <=30 KHz, in Celeron 600, 128M Windows 98 at Fs <= 100 KHz but in Windows 2000 the pipe reading run at the maximum frequency. It is also necessary to note that when concurrently applying 2 channels the sampling frequency doubles as, e.g. at Fs = 100 KHz the sampling frequency is actually Fs = 200 KHz. That's why when concurrently operating 2 channels the sampling frequency setup is automatically disabled if higher 100 KHz.