Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top