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.
工具/软件:Code Composer Studio
大家好
我正在使用 tms5701224 Launch Pad 并尝试与 as5600传感器通信。
我编写了以下代码。
请帮我纠正。
i2cREG1->SAR =(0x36);
i2cREG1->MDR |=(1<<10);
i2cREG1->CNT = 1;
i2cREG1->DXR =(0x0B);
i2cREG1->MDR |=(1<<9)|(1<<13);
while (i2cREG1->STR &(1<<12));
i2cREG1->CNT = 2;
i2cREG1->MDR &=~(1<<9);
i2cREG1->MDR |=(1<<11)|(1<10)|(1<<13);
while (i2cREG1->STR & 8));
角度= i2cREG1->DRR;
while (i2cREG1->STR & 8));
angle|=(i2cREG1->DRR<<8);
while (i2cREG1->STR &(1<<12));
while (i2cREG1->MDR &(1<<10));
我还想知道如何提供重复的 START 命令。