Other Parts Discussed in Thread: TMS5701224, HALCOGEN
Tool/software: Code Composer Studio
hello everyone
I am using tms5701224 launch pad and trying to communicate with as5600 sensor.
I have written the following code.
Please help me to rectify it.
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));
angle = i2cREG1->DRR;
while ((i2cREG1->STR & 8));
angle |= (i2cREG1->DRR<<8);
while((i2cREG1->STR & (1<<12)));
while(i2cREG1->MDR & (1<<10));
and i also want to know how to give repeated start command.