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 jusr read the thraad (it is Monday morning here) and I see one word in all your posts which is "NOW"
so, In your opininion, everybody that has a paid job and occsionally visit this forum, should immediately drop what they are doing to earn their pay and for free take care of the fact that you have no idea of even the most basic concepts.
Ok, here is a suggestion
post whithout using capitals a short synopsis of what the BCD format is and how YOU propose to code the conversion so we know that you have, at least, done some work yourself and maybe, just maybe someone will forget the way you have behaved so far in this thread.
Erik