The HEX equivalent of -5000 is 0xEC78 for a 16-bit representation.
TMR1H = 0xEC and TMR1L = 0x78
Is this to what you are referring?
BigDog
first of all Congratulations NATO routes Reopen. USA help Pakistan lot in war against terrorism.
Ur an american i think so that why i am saying to u its benefit for both of us.
now coming towards my confusing
1-yeah but TMR1H & TMR1L are 8-8 bit register respectively if we set the T1CON 16-bit timer.
now if we set TMR1H=-5000 which is equivalent to 0xEC78 then how the compiler know which eight bits should be taken first two or last two.
in datasheet example if found that the santax is only eight bits for each (TMR1H and TMR1L).
2- the second thing is TMR1H=-5000>>8
if compiler understand automatically that 0xEC78, EC is Higher 8bits and 78 are lower 8bits then why we are using right sift operator >>.
THANKX
- - - Updated - - -
I am sorry, on review that'd be a 64bit number!!! When there are too many digits things get confusing at any level!
16 x digits would be 16 x 4bits, or 8x8...
Cool, I always check the morning after I write anything, for this reason, no stress mate
Have fun
NEAL
NO, i think -5000 //hex equivalent is FFFFFFFFFFFFEC78 which is 16x4=64bits.
but as TMR1H=8bits so EC = 4x2=8bits and 78=4x2=8bits too hence total is 16bit because we have 16bit timer.
but confusion is that how compiler know if we feed TMR1H=-5000 which is TMR1H=0xEC78 is actually TMR1H=0xEC????
and TMR1L=-5000>>8 is actually TMR1L=0x78.
i read in the book that TM1H and TM1L are just 8-8bit. but we are referring them 16bits.
thanks lightdiode designs my helping friend ;-)
w8t what is course BD mate..
Happy
BABAR,
;-)