Recent Changes - Search:

radlab home

radlab support

generic HFDR

principles
hardware
software
production
documents
pictures

know-how

projects

CNMI-Guam
IFREMER
ISMER
PACIOOS
UABC
UHHilo
UP-MSI
WHOI

old projects

MEC
OGS
UAF

wiki instructions

.

D-Tacq ADC bit mapping

lrb 10-jun-2020

pf 17-jun-2020

pf 4-dec-2020 reversed bit sequences

Synopsis

The Texas Instrument Analog-Digital converter chip ADS1278, used in both the MK-II (D-Tacq ACQ 164) and MK-III (D-Tacq ACQ1001-435), outputs 24-bit integers (23 data bits + 1 signed bit). Because the common standard data format is 32 bit integer, every sample must be padded from 24 to 32 bit by the controlling hardware.

This padding is done differently between the MK-II and MK-III, therefore post-processing programs are not strictly compatible. Here, we explain the difference.

To illustrate the MK-III, we use two files: 20182451400_lpwr.dta, a calibration file with sine waves at 80 Hz offset, and 20201540600_lpwr.dta, a regular chirping file.

Data formats

Both MK-II and MK-III dtacqs have 24 bits of data in a 32 bit integer format, meaning there is one spare byte for each sample.

In the MK-II, the spare byte is the most significant byte (ACQ164 reference manual)), while in the MK-III, it is the least significant byte (ACQ435 reference manual).

In the MK-II, the spare byte is left empty, but in the MK-III, the spare byte contains: 1. in bits 0 to 4, a channel number counter; in bits 5 to 7, a constant programmable number.

Raw data

InstrumentLeast significant byteSecond least significant byteSecond most significant byteMost significant byte
MK-IIData 1Data 2Data 30
MK-IIIChannel & constantData 1Data 2Data 3

MK-II sample data. The bits in each byte are from least to most significant (left to right) so that the bits are listed continuously from least to most significant from left to right across bytes. Note that there are bits equal to 1 in the blank byte (most significant) because negative numbers are represented using two's complement, which is calculated by subtracting 1 to the positive representation and then swapping all bit values to their opposites so that 00100000 (32) -> 00011111 (31) -> 11100000 (-32).

Channel (for same sample #)Least significant byteSecond least significant byteSecond most significant byteMost significant byte
101110001011111010000000000000000
211110110000010101011111111111111
310010110100100100101111111111111
401000010110100111100000000000000
500100110101011101000000000000000
600001011011011110011111111111111
701100110110010101101111111111111
810111110100100011100000000000000

MK-III sample data. The bits in each byte are from least to most significant (left to right) so that the bits are listed continuously from least to most significant from left to right across bytes.

Channel (for same sample #)Least significant byteSecond least significant byteSecond most significant byteMost significant byte
100000100010110001000100000100101
110000100110011001100110100101101
101000100011001010001010111010001
111000100001001100000000101110100
100100100110101011001101001000101
110100100001100101010001011111010
101100100010101011110100111010010
111100100011001010010110010010011

Given the level of various noise sources, only the most significant 16-bits contain useful radar data.

Assuming that the amplification levels are chosen so that a calibration signal or the peak of the chirp return just reach the maximum voltage that can be sampled by the ADC, one needs to keep only to two most significant bytes of the 24-bit ADC data.

Therefore, in the MK-II, the two middle bytes of the 32-bit integer samples should be kept, while in the MK-III, the two most significant bytes of the 32-bit integer data should be kept. To do this, we shift data in the bytes leftwards by division until the bytes we want are in the two least significant bytes, and then we drop the two most significant bytes in a conversion from int32 to int16.

We need to shift the MK-II data by 1 byte, so the shift value that we divide by is ~2^8. For the MK-III, we need to shift 2 bytes, so there it is ~2^16.

Shifted data

InstrumentLeast significant byteSecond least significant byteSecond most significant byteMost significant byte
MK 2Data 2Data 300
MK 3Data 2Data 300

Shifted int16 data

InstrumentLeast significant byteMost significant byte
MK 2Data 2Data 3
MK 3Data 2Data 3

To view the raw dtacq data in bits, use xxd: xxd -b -c 4 20182451400_lpwr.dta | more, for example. Note that this prints the bytes in the same order as above, but the bits are listed from most to least significant (left to right), which differs from what is in the table above.

Edit - History - Print - Recent Changes - Search
Page last modified on December 05, 2020, at 01:32 am