当前位置:首页 > 电源 > 数字电源
[导读] 作为一个模拟世界的后裔,我经常可以在走廊上听到些评论,关于数字设计师多么不理解模拟问题。数字设计师们也毫不留情地批评模拟集成电路设计师。这两个阵营泾渭分明,除非参与者们打破界限,一起进入混合信号领域

 作为一个模拟世界的后裔,我经常可以在走廊上听到些评论,关于数字设计师多么不理解模拟问题。数字设计师们也毫不留情地批评模拟集成电路设计师。这两个阵营泾渭分明,除非参与者们打破界限,一起进入混合信号领域的研究。

  对典型的模拟精神,不是所有转换器都用相同的数据格式。一些转换器用无符号二进制数类型,其他转换器使用有符号二进制补码数据。甚至更复杂的问题,转换器输出12位或是14位数据,还有16位输出。还有另一种24位Δ-Σ转换器技术。

  先不管这些模拟设计结果的目的。对于这些转换器而言,ADC最低有效位的位置是这些8位、16位或是32位字处理器的第0位。对模拟电路设计者来说,这具有重要意义。然而,12位转换器的符号位是处理器的位置11。如果分配16位宽度的变量C为转换器输出值,假定C符号位是位置15。处理器不能从转换器识别出负数,所有来自12位的双极性ADC数据都是正的。因为符号位处于错误位置。

  你可以通过几个步骤来解决这个问题。首先,读-修改-写步骤,将处理器寄存器中的数据移位。CPU读取数据、移动包含数据的寄存器的位到必要的位置,然后将这些数据写回内存。DSP可以在一个时钟周期内完成移位。控制器需要很多时钟周期才能完成移位的过程。如果你选用了这种控制策略,要小心缓存区的不连续性。这意味着缓存区无法辨别DMA控制器是否将新数据写入内存。结果,CPU将缓存区的旧数据进行移位操作。需要记住的是,无论什么时候向左移了一位,就意味着ADC转换结果乘了2。

  另一种方式是在处理器循环中将数据右移。这种方式的缺点占用CPU并需要额外指令。另一种选择是直接将转换器与处理器的数据总线相连。如果你将12位转换器的第11位与处理器总线上的第15位相连,那么符号位就会处于正确的位置。然后将数据的第11位到第14位置零来完成数据获取,否则这些位的数据是不确定的。这种方法只适用于有并行接口。在这种方案中,基于DMA移动就不需要数据移位了。

  使用串行端口的用户比并行端口的用户要幸运的多,因为大部分处理器的串行端口提供接收的“左移用零填充至最低有效位”或“右移符号位扩展至最高有效位”特点。这种特色大大减少了CPU处理内存中数据的工作。一些串行端口只工作在接收数据长度是2的幂时,例如16位数据长度。这些端口不能工作在12、14或是24位数据长度时。

  模拟工程师帮助处理处理器接口问题。据我所知,处理器都是8位、16位或是32位的,我从没听说过12位或14位的处理器。除非所有的模拟芯片设计者突破界限,否则为转换器设计数字接口是理所当然的。阅读ADC数据手册,核对向数字接口传输的位的位置。如果对ADC数据接口做了初始检查,那么你会因为开始的付出获得更多成功。

  英文原文:

  Analog versus digital: Bridging the ADC-to-processor divide

  Don’t take things for granted when you are designing the digital interface to a converter. Read the ADC data sheet and verify the bit positions in the transmission across the digital interface.

  By Bonnie Baker -- EDN, 5/10/2007

  As an analog-world descendant, I always hear comments in the hallway about how digital designers don’t really understand analog issues. Digital designers will go so far as to unsympathetically say the same about analog-IC designers. There is no bridge between these two camps unless the participants ride the fence and enter the mixed-signal domain together.

  True to the analog spirit, not all data converters use the same digital format. Some converters use unsigned-binary-data types; other converters use two’s-complement signed data. To even further complicate matters, some converters produce 12- or 14-bit output words, and others produce 16-bit output words. Yet another technology is the 24-bit delta-sigma converter.

  Forget the reasons for these analog-design decisions. With all of these converters, the location of the ADC LSB is in the processor’s 0-bit location within the 8-, 16-, or 32-bit word. This situation makes perfect sense to an analog designer. However, the signed-bit of a 12-bit converter resides in position 11 in the processor. If you assign a 16-bit-wide C variable to the converter’s output word, C assumes that the sign bit is in position 15. The processor does not recognize a negative number from the converter and assumes that all codes from the 12-bit, bipolar-in ADC are positive. This situation occurs because the signed bit is in the wrong position.

  You can approach this problem in several ways. The first, a read-modify-write approach, shifts data in the processor register. The CPU reads the data, shifts the bits in the register containing the data by the necessary amount of bit positions, and writes the data back to memory. A DSP can complete this shift with one cycle. A controller requires many cycles for this shift process. If this strategy is the one you choose, be careful of cache incoherency. Cache incoherency means that the cache is unaware that the DMA controller has placed new words in memory. As a result, the CPU instead shifts the old contents of the cache. It is important to remember that whenever you implement a bit shift to the left, you multiply the ADC results by two.

  Another option is to shift the data into the right position in a processor loop. On the downside, this approach uses the CPU and requires additional MIPS. Another alternative is to directly connect the converter to the processor’s data bus. If you connect bit 11 of the 12-bit converter to bit 15 of the processor’s data bus, the sign bit will then be in the right place. Complete the data-acquisition task by zeroing register bits 11 through 14. Otherwise, these bits are indeterminate. This approach is possible only with parallel interfaces. In this scenario, the DMA-based transfer need not shift data later on.

  Serial-port users are more fortunate than parallel-port users because most of the serial ports in processors offer the receiving feature of “left justify and zero fill LSBs” or “right justify and sign-extend MSBs.” This feature significantly reduces the amount of work the CPU must perform once the data is in memory, with one drawback. Some serial ports work only if the received word length is a power of two, such as a 16-bit word length. This receiving feature does not work with 12-, 14-, or 24-bit values.

  Analog designers can help with the processor-interface problem. All the processors I know about have 8-, 16- or 32-bit data types, but I have never heard of a 12- or 14-bit data type. Until all of the analog-chip designers take the leap and straddle the fence, don’t take things for granted when you are designing the digital interface to a converter. Read the ADC data sheet and verify the bit positions in the transmission across the digital interface. If you do this initial examination of the ADC’s documented digital interface, you will be more successful with your first spin on the design.

本站声明: 本文章由作者或相关机构授权发布,目的在于传递更多信息,并不代表本站赞同其观点,本站亦不保证或承诺内容真实性等。需要转载请联系该专栏作者,如若文章内容侵犯您的权益,请及时联系本站删除。
换一批
延伸阅读

LED驱动电源的输入包括高压工频交流(即市电)、低压直流、高压直流、低压高频交流(如电子变压器的输出)等。

关键字: 驱动电源

在工业自动化蓬勃发展的当下,工业电机作为核心动力设备,其驱动电源的性能直接关系到整个系统的稳定性和可靠性。其中,反电动势抑制与过流保护是驱动电源设计中至关重要的两个环节,集成化方案的设计成为提升电机驱动性能的关键。

关键字: 工业电机 驱动电源

LED 驱动电源作为 LED 照明系统的 “心脏”,其稳定性直接决定了整个照明设备的使用寿命。然而,在实际应用中,LED 驱动电源易损坏的问题却十分常见,不仅增加了维护成本,还影响了用户体验。要解决这一问题,需从设计、生...

关键字: 驱动电源 照明系统 散热

根据LED驱动电源的公式,电感内电流波动大小和电感值成反比,输出纹波和输出电容值成反比。所以加大电感值和输出电容值可以减小纹波。

关键字: LED 设计 驱动电源

电动汽车(EV)作为新能源汽车的重要代表,正逐渐成为全球汽车产业的重要发展方向。电动汽车的核心技术之一是电机驱动控制系统,而绝缘栅双极型晶体管(IGBT)作为电机驱动系统中的关键元件,其性能直接影响到电动汽车的动力性能和...

关键字: 电动汽车 新能源 驱动电源

在现代城市建设中,街道及停车场照明作为基础设施的重要组成部分,其质量和效率直接关系到城市的公共安全、居民生活质量和能源利用效率。随着科技的进步,高亮度白光发光二极管(LED)因其独特的优势逐渐取代传统光源,成为大功率区域...

关键字: 发光二极管 驱动电源 LED

LED通用照明设计工程师会遇到许多挑战,如功率密度、功率因数校正(PFC)、空间受限和可靠性等。

关键字: LED 驱动电源 功率因数校正

在LED照明技术日益普及的今天,LED驱动电源的电磁干扰(EMI)问题成为了一个不可忽视的挑战。电磁干扰不仅会影响LED灯具的正常工作,还可能对周围电子设备造成不利影响,甚至引发系统故障。因此,采取有效的硬件措施来解决L...

关键字: LED照明技术 电磁干扰 驱动电源

开关电源具有效率高的特性,而且开关电源的变压器体积比串联稳压型电源的要小得多,电源电路比较整洁,整机重量也有所下降,所以,现在的LED驱动电源

关键字: LED 驱动电源 开关电源

LED驱动电源是把电源供应转换为特定的电压电流以驱动LED发光的电压转换器,通常情况下:LED驱动电源的输入包括高压工频交流(即市电)、低压直流、高压直流、低压高频交流(如电子变压器的输出)等。

关键字: LED 隧道灯 驱动电源
关闭