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.

TLV5625问题

Other Parts Discussed in Thread: TLV5625

大神好,帮帮我吧。

问题:我在使用TLV5625时出现如下问题,在主函数里面的FOR循环中对两通道赋值,2通道DA可以正常更新输出,但是同样的语句放到定时器中断中,只有一个通道正常,另一个通道不能更新数据,请指教,谢谢。程序如下:

CS=0; 
  if(Spi_TxReady()==1) //发送准备已就绪
  {
     SpiaRegs.SPITXBUF=0x1A00; //OUTB发送数据
  }
  while(Spi_TxReady()==0);
   CS=1;
   delay(10);
   CS=0;
 if(Spi_TxReady()==1)
        {
      SpiaRegs.SPITXBUF=0x8A00; //OUTA发送数据
  }
     while(Spi_TxReady()==0);
  CS=1;