- This topic has 2 replies, 2 voices, and was last updated 13 years, 5 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
|
Microcontroller › 8051 › plz tell me how to use 16 bit timer value
i want to compare 16 bit timer value but i cant i want to save it in register but all the register in 89C51 are 8 bit an the timer 0 value is set to 16 bit MODE plz give me any solution
hi zobi,
use DPTR register of 8051..
or take an unsigned int what would be a 16 bit variable;
eg:
unsigned int i=0x1234;
P1=i;
P2=i>>8;
The output for P1 will be 0x34 and for P2=0x12;
i tried the above example you can use according to your program
i have tried to use DPTr but it is not possible DPTR can not be used for data storage or for saving any value
and the e.g. you have given is so difrrent , i cant understand what does it mean is it in ASSEMBLY or C LANGUAGE?