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.

ADS1298R寄存器写不进去

Other Parts Discussed in Thread: ADS1298R

您好,我用DSP2812读写ADS1298R,但是spi一直写不进去寄存器,不知道是为什么?这是我读写的程序。

void writeREG(Uint16 valu)

{ SpiaRegs.SPITXBUF=valu;

  while(SpiaRegs.SPISTS.bit.INT_FLAG!=1)

  {}

  SpiaRegs.SPIRXBUF=SpiaRegs.SPIRXBUF;

 }

unsigned int dataread(void)

{Uint16 data;

 SpiaRegs.SPITXBUF=0x0000;

 while(SpiaRegs.SPISTS.bit.INT_FLAG!=1)

  {}

 data=SpiaRegs.SPIRXBUF;

 return(data);

}

发送完寄存器的值之后,用读寄存器指令读寄存器的值一直读不出来,连ID寄存器都读不出来,请教是怎么回事啊?