Analog to digital: bridge from ADC to processor

As a descendant of the analog world, I can often hear comments on the corridor about how digital designers don't understand simulation. Digital designers have also mercilessly criticized analog IC designers. The two camps are distinct, unless the participants break the boundaries and join the research in the mixed-signal field.

For the typical analog spirit, not all converters use the same data format. Some converters use unsigned binary number types, others use signed two's complement data. Even more complicated, the converter outputs 12-bit or 14-bit data, as well as a 16-bit output. There is another 24-bit delta-sigma converter technology.

Regardless of the purpose of these analog design results. For these converters, the least significant bit of the ADC is the 0th bit of these 8-bit, 16-bit or 32-bit word processors. This is important for analog circuit designers. However, the sign bit of the 12-bit converter is the position 11 of the processor. If the variable C of 16-bit width is assigned to the converter output value, the C-sign bit is assumed to be position 15. The processor cannot recognize negative numbers from the converter and all bipolar ADC data from 12 bits are positive. Because the sign bit is in the wrong position.

You can solve this problem in a few steps. First, the read-modify-write step shifts the data in the processor registers. The CPU reads the data, moves the bits of the register containing the data to the necessary location, and then writes the data back to memory. The DSP can complete the shift in one clock cycle. The controller takes many clock cycles to complete the shifting process. If you choose this control strategy, be careful about the discontinuity of the buffer area. This means that the buffer cannot tell if the DMA controller is writing new data to memory. As a result, the CPU shifts the old data of the buffer area. It's important to remember that whenever you move one bit to the left, it means that the ADC conversion result is multiplied by 2.

Another way is to shift the data to the right in the processor loop. The disadvantages of this approach take up the CPU and require additional instructions. Another option is to connect the converter directly to the processor's data bus. If you connect the 11th bit of the 12-bit converter to the 15th bit on the processor bus, the sign bit will be in the correct position. Then the data is acquired from the 11th to the 14th position of the data, otherwise the data of these bits is undefined. This method is only suitable for having a parallel interface. In this scheme, data shifting is not required based on DMA movement.

Users who use the serial port are much more fortunate than users of the parallel port because the serial port of most processors provides the received "left shift with zero padding to least significant bit" or "right shift sign bit extended to the most significant bit "Features. This feature greatly reduces the CPU's ability to process data in memory. Some serial ports only work when the received data length is a power of two, such as a 16-bit data length. These ports cannot work at 12, 14 or 24 bit data lengths.

Simulation engineers help with processor interface issues. As far as I know, the processors are all 8-bit, 16-bit or 32-bit. I have never heard of a 12- or 14-bit processor. Unless all analog chip designers break the boundaries, designing digital interfaces for converters is a matter of course. Read the ADC data sheet to verify the location of the bits transmitted to the digital interface. If you do an initial check of the ADC data interface, then you will get more success because of the initial effort.

Traffic Facilities

Traffic Facilities,Waterproof Traffic Facilities,Outdoor Traffic Facilities,Traffic Control Devices

Yangzhou Heli Photoelectric Co., Ltd. , https://www.heli-eee.com

Posted on