principles projects CNMI-Guam old projects |
KnowHow /
D-Tacq ADC bit mappinglrb 10-jun-2020 pf 17-jun-2020
SynopsisThe 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 formatsBoth 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
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).
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.
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
Shifted int16 data
To view the raw dtacq data in bits, use |