This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DDC112: DDC112U数据转换问题

Part Number: DDC112


void Read_Data(void)
{

DxMIT_LOW(); //DxMIT_HIGH();
delay_ms(1);



while(Read_pin(1));


DxMIT_HIGH(); // DxMIT_LOW();
// DCLK_LOW();
delay_ms(10);
// __nop();
while(1)
{

DCLK_HIGH();      

delay_ms(5);

ddc112u_data|= Read_E_pin(1);
// delay_ms(10);
DCLK_LOW();


n++;


// delay_us(5);
ddc112u_data<<=1;

delay_ms(5);


if(n>=20)
{
DxMIT_LOW();// DxMIT_HIGH();
ddc112u_data&=0x0fffff;
ddc112u_data=0;
n=0;
break;

}
}

f=!f;

GPIO_WriteBit(GPIOE,GPIO_Pin_11,f);
// GPIO_WriteBit(GPIOE,GPIO_Pin_10,f);



if(count>=100 && f)
{

// m=!m;
GPIO_WriteBit(GPIOE,GPIO_Pin_10,m=!m);
count=0;

}
count++;

使用GPIO模拟输出频率, DxMIT_LOW mcu引脚 通过与非门连到DDC112,这里输入高低电平是反的,                clk大概 500khz,conv 大概  5khz,输入4-20ma,   但是转换结果不对,一直是0,不知是什么原因

 

  • 您好,

    您要测量 4-20mA电流吗?使用 DDC112应该不太合适,因为它是测量电量的ADC,一般用来测微弱电流的,测量单位是pC:

    虽然测量量程与CF有关,但是测量这么大的电流需要很大的CF: