Cannot compare unsigned char with hexadecimal
I have a code like that. The program won’t reach if condition when SBUF is 0xAA. if (SBUF==0xaa) { AA_flag=1; config[0]=170; }
How do you know that SBUF does actually contain 0xAA?
Did you write an AA to SBUF and then expect to check it? Remember that the location is actually two different registers, one for data written and the other for incoming data when read.
Please read the instructions on how to post source code: www.danlhenry.com/.../keil_code.png
Note that TABs don't work (well) - use spaces instead,
and don't forget to check it in the 'Preview'...