已回答假定已回答

AD7124-8的热电偶温度测量结果不正常

leiyu1139 在 2017-8-10 詢問的問題
最後回覆由周天强於2018-7-31提供

参照官网提供的CN0384_cn资料,做了个6通道的热电偶测量,但是调试代码的时候发现,每个通道的测量值都不对,是哪里没有设置好么?

AIN0-AIN11为热电偶通道,AIN12输出500ua、AIN13 AIN14为KTY81-110通道,原理图如下:

寄存器的json配置文件:

{

    "Generic": "AD7124-8",

    "Registers": [

        {

            "Address": "0x0",

            "Name": "Status",

            "Value": "0x0"

        },

        {

            "Address": "0x1",

            "Name": "ADC_Control",

            "Value": "0x584"

        },

        {

            "Address": "0x2",

            "Name": "Data",

            "Value": "0x0"

        },

        {

            "Address": "0x3",

            "Name": "IO_Control_1",

            "Value": "0x840C"

        },

        {

            "Address": "0x4",

            "Name": "IO_Control_2",

            "Value": "0x555"

        },

        {

            "Address": "0x5",

            "Name": "ID",

            "Value": "0x0"

        },

        {

            "Address": "0x6",

            "Name": "Error",

            "Value": "0x0"

        },

        {

            "Address": "0x7",

            "Name": "Error_En",

            "Value": "0x44"

        },

        {

            "Address": "0x8",

            "Name": "MCLK_Count",

            "Value": "0x0"

        },

        {

            "Address": "0x9",

            "Name": "Channel_0",

            "Value": "0x8001"

        },

        {

            "Address": "0xA",

            "Name": "Channel_1",

            "Value": "0x8043"

        },

        {

            "Address": "0xB",

            "Name": "Channel_2",

            "Value": "0x8085"

        },

        {

            "Address": "0xC",

            "Name": "Channel_3",

            "Value": "0x80C7"

        },

        {

            "Address": "0xD",

            "Name": "Channel_4",

            "Value": "0x8109"

        },

        {

            "Address": "0xE",

            "Name": "Channel_5",

            "Value": "0x814B"

        },

        {

            "Address": "0xF",

            "Name": "Channel_6",

            "Value": "0x1"

        },

        {

            "Address": "0x10",

            "Name": "Channel_7",

            "Value": "0x1"

        },

        {

            "Address": "0x11",

            "Name": "Channel_8",

            "Value": "0x1"

        },

        {

            "Address": "0x12",

            "Name": "Channel_9",

            "Value": "0x1"

        },

        {

            "Address": "0x13",

            "Name": "Channel_10",

            "Value": "0x1"

        },

        {

            "Address": "0x14",

            "Name": "Channel_11",

            "Value": "0x1"

        },

        {

            "Address": "0x15",

            "Name": "Channel_12",

            "Value": "0x1"

        },

        {

            "Address": "0x16",

            "Name": "Channel_13",

            "Value": "0x91AE"

        },

        {

            "Address": "0x17",

            "Name": "Channel_14",

            "Value": "0x1"

        },

        {

            "Address": "0x18",

            "Name": "Channel_15",

            "Value": "0x1"

        },

        {

            "Address": "0x19",

            "Name": "Config_0",

            "Value": "0x9F7"

        },

        {

            "Address": "0x1A",

            "Name": "Config_1",

            "Value": "0x9E0"

        },

        {

            "Address": "0x1B",

            "Name": "Config_2",

            "Value": "0x860"

        },

        {

            "Address": "0x1C",

            "Name": "Config_3",

            "Value": "0x860"

        },

        {

            "Address": "0x1D",

            "Name": "Config_4",

            "Value": "0x860"

        },

        {

            "Address": "0x1E",

            "Name": "Config_5",

            "Value": "0x860"

        },

        {

            "Address": "0x1F",

            "Name": "Config_6",

            "Value": "0x860"

        },

        {

            "Address": "0x20",

            "Name": "Config_7",

            "Value": "0x860"

        },

        {

            "Address": "0x21",

            "Name": "Filter_0",

            "Value": "0x60180"

        },

        {

            "Address": "0x22",

            "Name": "Filter_1",

            "Value": "0x60180"

        },

        {

            "Address": "0x23",

            "Name": "Filter_2",

            "Value": "0x60180"

        },

        {

            "Address": "0x24",

            "Name": "Filter_3",

            "Value": "0x60180"

        },

        {

            "Address": "0x25",

            "Name": "Filter_4",

            "Value": "0x60180"

        },

        {

            "Address": "0x26",

            "Name": "Filter_5",

            "Value": "0x60180"

        },

        {

            "Address": "0x27",

            "Name": "Filter_6",

            "Value": "0x60180"

        },

        {

            "Address": "0x28",

            "Name": "Filter_7",

            "Value": "0x60180"

        },

        {

            "Address": "0x29",

            "Name": "Offset_0",

            "Value": "0x800000"

        },

        {

            "Address": "0x2A",

            "Name": "Offset_1",

            "Value": "0x800000"

        },

        {

            "Address": "0x2B",

            "Name": "Offset_2",

            "Value": "0x800000"

        },

        {

            "Address": "0x2C",

            "Name": "Offset_3",

            "Value": "0x800000"

        },

        {

            "Address": "0x2D",

            "Name": "Offset_4",

            "Value": "0x800000"

        },

        {

            "Address": "0x2E",

            "Name": "Offset_5",

            "Value": "0x800000"

        },

        {

            "Address": "0x2F",

            "Name": "Offset_6",

            "Value": "0x800000"

        },

        {

            "Address": "0x30",

            "Name": "Offset_7",

            "Value": "0x800000"

        },

        {

            "Address": "0x31",

            "Name": "Gain_0",

            "Value": "0x500000"

        },

        {

            "Address": "0x32",

            "Name": "Gain_1",

            "Value": "0x500000"

        },

        {

            "Address": "0x33",

            "Name": "Gain_2",

            "Value": "0x500000"

        },

        {

            "Address": "0x34",

            "Name": "Gain_3",

            "Value": "0x500000"

        },

        {

            "Address": "0x35",

            "Name": "Gain_4",

            "Value": "0x500000"

        },

        {

            "Address": "0x36",

            "Name": "Gain_5",

            "Value": "0x500000"

        },

        {

            "Address": "0x37",

            "Name": "Gain_6",

            "Value": "0x500000"

        },

        {

            "Address": "0x38",

            "Name": "Gain_7",

            "Value": "0x500000"

        }

    ]

}

 

读取结果如下:

結果