Справочник Пользователя для Spectrum Brands MI.61XX

Скачать
Страница из 79
FIFO Mode
Programming
(c) Spectrum GmbH
53
The samples are re-named for better readability. A0 is sample 0 of channel 0, C4 is sample 4 of channel 2, ...
The following example shows how to sort the channel data when using 4 channels in FIFO mode:
Sample format
The sample format in FIFO mode does not differ from the one of the standard (non FIFO) mode. Please refer to the relating passage concerning 
the sample format in the standard acquisition chapter.
X
X
A0
B0
A1
B1
A2
B2
A3
B3
A4
B4
A5
B5
A6
B6
A7
B7
A8
B8
A9
B9
X
X
X
X
A0
C0
B0
D0
A1
C1
B1
D1
A2
C2
B2
D2
A3
C3
B3
D3
A4
C4
B4
D4
for (i = 0; i < lBufferSizeInSamples; i+=4)
    {
    FIFOBuffer[i + 0] = Data[0][i/4];
    FIFOBuffer[i + 2] = Data[1][i/4];
    FIFOBuffer[i + 1] = Data[2][i/4];
    FIFOBuffer[i + 3] = Data[3][i/4];
    }
Ch0
Ch1
Ch2
Ch3
Sample ordering in FIFO buffer