how to print the values of TH0 and TL0 registers using printf() in keil c...

Status
Not open for further replies.

bpramod

Member level 1
Joined
Sep 21, 2011
Messages
38
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,534
hi friends..
unsined char x,y;
//in between prog x and y are initialized to some values

TH0= 0xff-x;
TL0= 0xff-y;

printf("\ncounts for delay are : %bx and %bx\n",TH0,TL0);


but it showing TH0 and TL0 values are wrong ....
 

i have tried the program in keil and i am getting the correct answer. Please try an example, say x=10 and y=20 what values are you getting?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…