We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
While using the simulator, the values of i in the serial window are shifted by left 8 bits.
#include "stdlib.h" #include "stdio.h" #include "reg51.h" void main (void) { unsigned char i; SCON = 0x50; TMOD |= 0x20; TH1 = 221; TR1 = 1; TI = 1; for (i = 0; i < 8; i++) { printf("%x\n", i); } }
"I HAVE GOT 2 HOURS LEFT TO DO THIS"
A pity -- time is running out. But look at it this way, after time has run out and you fail, you'll have time to reflect on this experience, reread posts, and realize "If I hadn't solicited all those wasted replies simply on the topic of SHOUTING, I might have gotten a legitimate reply on my topic exactly or have been given guidance on how to use Google to effectively search for solutions to my problem. Dang it, I only I had listened and acted accordingly..."