I am trying to read 6 bytes of data from an encoder and store them to an array, for my example write_data[i]. However, I do not know how to write the function that initiated the IC2 rountine to receive the data from the input. Once I have the values in an array I know how to proceed.
void I2CA_ReadData(void)
{
" NEED HELP HERE"
AGC=write_data[0];
error_status=write_data[1]&0x0F;
MAG =(write_data[2]<<6)+(write_data[3]&0x3F);
ANG =(write_data[4]<<6)+(write_data[5]&0x3F);
return;
}