I have fixed a all mistakes in flow chart. I have spent a so much time on flow chart so I hope this flow chart would be correctFirst, please just trace the flow as I asked in #99 after the EDIT. We can not proceed until you do that.
#define SlaveAddress 0xD1
int main()
{
unsigned char P;
unsigned ByteCount = 9;
unsigned char RegisterAddress [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8} ; // 9 bytes register address stored into array
P = I2C_Readbyte (SlaveAddress, unsigned int ByteCount, RegisterAddress);
return 0;
}
No, you haven't. You have introduced a new flow chart with new mistakes.I have fixed a all mistakes in flow chart.
That's because you continually refuse to do what I ask you to do so that we can resolve problems one by one instead of introducing new ones at random. In #99, I asked you to trace the last flow chart and post the numbers representing the flow. TWICE. I wanted to know if your problems were in step-by-step reasoning or in knowledge of I2C. I still don't know. I think you have problems in both but I can't help you because you won't follow directions. I am out of ideas to figure it out so I need to stop here.I have spent a so much time on flow chart
Your flow chart is better than my flow chart I was confident this time because I had written a simple program and tested the code to read memory location of array.That's because you continually refuse to do what I ask you to do so that we can resolve problems one by one instead of introducing new ones at random. In #99, I asked you to trace the last flow chart and post the numbers representing the flow. TWICE. I wanted to know if your problems were in step-by-step reasoning or in knowledge of I2C. I still don't know. I think you have problems in both but I can't help you because you won't follow directions. I am out of ideas to figure it out so I need to stop here.
#include<stdio.h>
int read (unsigned int N, unsigned int *p);
int read (unsigned int N, unsigned int *p)
{
int i;
for (int i = N-1; i >= 0; i--) {
printf("\n read address %p \n ", (p + N-1));
printf("value store at this address is = %d \n", *( p + N-1));
--p;
}
}
int main()
{
int s; int N = 5 ; // length of array
int Data[] = {1, 2, 3, 4, 5};
s= read (N, Data);
return 0;
}