I need to know what is wrong with uVision. I had not seen this before.
I wrote this piece of code in uVisio, the program is not working well. When I simulated it, I realized the compiler is not doing the right process:
void Write_LCD(unsigned int A ){ unsigned int E; E=0xf0&A; //here is the problem*** LCD_Data=e; ... }
in ***, E=0xf0&A, the compiler does not execute the ligical operation AND, it passes the value of A to E and when I put parenthesis, this is E=(0xf0&A); it puts 0x00 to the variable E. I wonder what is wrong with this instruction?
Thanks for your help.
this may sound silly, but if 'A' is less of equal than 0xF, 'E' will always be assigned 0, of course. 'E = A' will happen if 'A' >= 0xF0.
'E = A' will happen if 'A' >= 0xF0.
oops. a mistake but I think you get the spirit of what I was trying to say...!