tag 标签: ad7792

相关帖子
相关博文
  • 2022-7-18 10:25
    0 个评论
    瑞盟 MS5192T 模数转换器-完美替代AD7792
    瑞盟 MS5192T/MS5193T 为适合高精度测量应用的低功耗、低噪声、三通道差分输入的 16bit/24bit 模数转换器 。完美替代 AD7792 。其内部集成了输入缓冲器、仪表放大器,当增益设置为 64,更新速率为 4.17Hz时,均方根噪声为 25nV。集成了精密低噪声、低漂移内部带隙基准,也可采用外部差分基准电压。片内还集成可编程激励电流源、burnout 电流源和偏置电压发生器。偏置电压发生器可将通道共模电压设置为 0.5*AVDD。芯片采用外部时钟或内部时钟, 输出数据速率可通过软件设置为 4.17Hz 到 470Hz。电源电压范围为 2.7V 到 5.25V。 MS5192T/MS5193T 采用了 TSSOP16 封装。 主要特点 RMS 噪声:在 4.17Hz 为 25nV;在 16.7Hz 为 30nV; 功耗:典型值为 380uA 集成可编程增益放大器 集成低温漂电压基准 更新速率:4.17Hz 到 470Hz 集成 50Hz/60Hz 限波滤波器 集成可编程电流源 集成偏置电压发生器 电源电压:2.7V 到 5.25V 工作温度范围:-40℃~105℃ 应用 热电偶和 RTD 测量 衡器应力检测 气体分析和血液分析 工业过程控制和仪器仪表 液相和气相色谱仪 智能发射机 6 位 DVM 可提供样品测试,FAE技术支持,完美替代AD7792,样品申请欢迎留言或私信
  • 热度 29
    2015-2-5 15:42
    5759 次阅读|
    1 个评论
    本驱动代码适用于ADI公司的AD779X系列ADC芯片,所有与硬件平台相关的代码都最大化的提取了出来,达到了最优化的移植性,本文档及代码旨在分享个人的开发工作,减少工程师们的开发周期,提高大家的工作效率。 测试时硬件平台我使用的是一块cortex-M3的单片机来和AD779X通信,具体型号为NXP公司的LPC1752单片机,原理图如下: 由上图可以看到AD779X的基准芯片采用ADI公司的ADR34XX系列芯片,AD779X与单片机的管脚连接有SCLK/CS/DI/DOUT共四个管脚,即AD779X的数字串行通信引脚。 A779X芯片的驱动代码整理后已经高度模块化,移植起来非常方便,整个移植过程只需要修改三个非常简单的地方即可使用,加快开发进度: 管脚定义及功能设置(与单片机相连的管脚定义,输入输出设置) /***********PIN define**************************/ #define      AD779x_DIN    (16) #define      AD779x_CS      (17) #define      AD779x_SCLK  (18) #define      AD779x_DOUTRDY (110) /******************************************************** *FUNCTION:Set pin function on MCU **********************************************************/ void McuGpioSet(void) 管脚写1或写0功能函数 /******************************************************* *FUNCTION:     AD779X PIN state set *PARAMETER:  PIN---serial pin on AD779X,may nex value: *                                    AD779X_DIN/AD779X_CS/AD779X_SCLK/AD779X_DOUTRDY *                           Data---set value:0/1 *******************************************************/ void AD779x_PIN_SET(unsigned int PIN, unsigned char Data) {                   if(Data)                             LPC_GPIO2-FIOSET |= PIN;                   else                             LPC_GPIO2-FIOCLR |=PIN; } 管脚电平状态读取函数 /****************************************************** *FUNCITON:AD779X PIN STATE READ *PARAMETER:PIN---serial pin,may next value: *                                    AD779X_DOUTRDY *******************************************************/ unsigned char   AD779X_PIN_READ(unsigned int PIN) { unsigned char VarDat;   if(LPC_GPIO2-FIOPIN PIN)            VarDat=1; else            VarDat=0;   return VarDat; } 从上面描述可以看出,芯片AD779X的移植非常简单高效,为项目开发节约时间,提高工作效率,一下为高度模块化的子模块函数,与平台无关,移植时不用修改: /****************************************************** *FUNCTION:    AD779X serial pin initial *******************************************************/ void AD779xInitialization(void)   /************************************************* *FUNCTION:    Serial interface reset                 *************************************************/ void AD779xSoftwareReset(void)   /************************************************** *FUNCTION: write data in registers *PARAMETER:RegisterAddress---register address,may next value: *                                            COMMUNICATIONS, *                                            IO, *                                            MODE, *                                            CONFIGURATION, *                                            OFFSET, *                                            FULLSCALE *                          RegisterBuffer---register data buffer point *                          CHIP---chip choose,may next value: *                                            AD7794 *                                            AD7795 *                                            AD7796 *                                            AD7797 **************************************************/ void AD779xWriteRegister(unsigned char RegisterAddress, unsigned long int *RegisterBuffer,unsigned char CHIP)   /************************************************************************ *FUNCTION:read data from register *PARAMETER:RegisterAddress---register address , may next value: *                                            STATUS, *                                            ID, *                                            MODE, *                                            CONFIGURATION, *                                            OFFSET, *                                            FULLSCALE, *                                            DATA *                          RegisterBuffer---data buffer point *                          CHIP---chip choose,may next value: *                                            AD7794 *                                            AD7795 *                                            AD7796 *                                            AD7797 *************************************************************************/ void AD779xReadRegister(unsigned char RegisterAddress, unsigned long int *RegisterBuffer,unsigned char CHIP)   /************************************************************************** *FUNCTION:Read result for single conversion mode *PARAMETER: DataIndex---the sotre place in DataBuffer *                         DataBuffer---data store buffer *                          CHIP---which type,may next value: *                                   AD7792/AD7793/AD7794/AD7795/AD7796/AD7797 **************************************************************************/ void AD779xReadResultForSingleConversion(unsigned char DataIndex, unsigned long int *DataBuffer,unsigned char CHIP)   /************************************************************************** *FUNCTION:Read result for continuous conversion mode *PARAMETER: StartIndex---the first store place in DataBuffer *                          NumberOfData---data numbers *                          DataBuffer---data store buffer *                          CHIP---which type,may next value: *                                   AD7792/AD7793/AD7794/AD7795/AD7796/AD7797 **************************************************************************/ void AD779xReadResultForContinuousConversion(unsigned char StartIndex, unsigned char NumberOfData, unsigned long int *DataBuffer,unsigned char CHIP)   /************************************************************************** *FUNCTION:Read result for continuous read mode *PARAMETER: StartIndex---the first store place in DataBuffer *                          NumberOfData---data numbers *                          DataBuffer---data store buffer *                          CHIP---which type,may next value: *                                   AD7792/AD7793/AD7794/AD7795/AD7796/AD7797 **************************************************************************/ void AD779xReadResultForContinuousRead(unsigned char StartIndex, unsigned char NumberOfData, unsigned long int *DataBuffer,unsigned char CHIP)   /************************************************************************* *FUNCITON:Exit continous read mode *PARAMETER: CHIP---which type,may next value: *                                   AD7792/AD7793/AD7794/AD7795/AD7796/AD7797 **************************************************************************/ void AD779xExitContinuousRead(unsigned char CHIP)            以上为该芯片驱动代码所有的子模块函数,在主函数中就可以调用这些子函数配置寄存器和读取ADC的值,下面代码即使用连续转换方式(Continuous Conversion)读取通道2的数据,然后将读取的数据通过UART接口打印输出,该代码在实际的硬件平台调试通过:    /********************************************************************************************************* ** Function name:       main ** Descriptions:         ** input parameters:    无 ** output parameters:   无 ** Returned value:      无 *********************************************************************************************************/ int  main (void) {            SystemInit();                                                       /*MCU system initial*/          uart0Init ();                                                                                 /*uart initial*/            printf("General Platform v1.0!\n");            myDelay(1000);            AD779xInitialization();          AD779xSoftwareReset();          NopDely(100*50);   // read ID register          AD779xRegisters =WRITE_ENABLE|READ|RS_ID|CREAD_DISABLE;          AD779xWriteRegister(COMMUNICATIONS, AD779xRegisters,AD7794);          AD779xReadRegister(ID, AD779xRegisters,AD7794);            printf("RESET ID REGISTER=0x%04X\n",AD779xRegisters );   // read STATUS register          AD779xRegisters =WRITE_ENABLE|READ|RS_STATUS|CREAD_DISABLE;          AD779xWriteRegister(COMMUNICATIONS, AD779xRegisters,AD7794);          AD779xReadRegister(STATUS, AD779xRegisters,AD7794);            printf("RESET STATUS REGISTER=0x%04X\n",AD779xRegisters );     //WRITE MODE REGISTER          AD779xRegisters =WRITE_ENABLE|WRITE|RS_MODE|CREAD_DISABLE;          AD779xWriteRegister(COMMUNICATIONS, AD779xRegisters,AD7794); AD779xRegisters =MD_CONTINUOUS_CONVERSION|PSW_ENABLE|AMP_CM_ENABLE|CLK_INTERNAL_OUTPUT_ENABLE|CHOP_DISABLE|FILTER_UPDATE_RATE_242;          AD779xWriteRegister(MODE, AD779xRegisters,AD7794);   //WRITE CONFIGURATION               AD779xRegisters =WRITE_ENABLE|WRITE|RS_CONFIGURATION|CREAD_DISABLE;          AD779xWriteRegister(COMMUNICATIONS, AD779xRegisters,AD7794); AD779xRegisters =VBIAS_DISABLE|BO_DISABLE|BIPOLAR|BOOST_DISABLE|GAIN_1|REFSEL_EXTERNAL_REF1|REF_DETECT_DIASBLE|BUF_ENABLE|CHANNEL_AIN2;          AD779xWriteRegister(CONFIGURATION, AD779xRegisters,AD7794);          while(1)          {                      AD779xReadResultForContinuousConversion(0, 1, AD779xData,AD7794);                             printf("convertion data1:0x%03X,data2:0x%03X\n",AD779xData ,AD779xData );                    myDelay(1000);          } } http://item.taobao.com/item.htm?id=43307575672;