Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 230135

Forum Post: I2C Read Function

$
0
0

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;

}


Viewing all articles
Browse latest Browse all 230135

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>