This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Trouble accessing array values

I'm having difficulty accessing a value from an array. Here's an example of what the code is doing:

unsigned char xdata In_Buf[2][70];
unsigned char port;

void main(void){

port = In_Buf[0][0];

.
.
}


port never updates no matter what the value of the first array element.

Anyone have a suggestion?

Parents
  • Paul,

    I don't seen anything obvious in the code you posted. Perhaps a more complete (but small) sample would help. I'm thinking that it might relate to how port is being used (could it be that it is getting optimised).

    How do you know post never gets updated? have you looked at the resultant assembly code?

    Regards,
    Steven

Reply
  • Paul,

    I don't seen anything obvious in the code you posted. Perhaps a more complete (but small) sample would help. I'm thinking that it might relate to how port is being used (could it be that it is getting optimised).

    How do you know post never gets updated? have you looked at the resultant assembly code?

    Regards,
    Steven

Children