How to convert the decimal value to hexadecimal value which needed to be stored in the timer? for example: Timer Low and Timer High only need 2 values such as the 0xFB. How can we extract it if we able to get the hexa from decimal? Have any ideas abt this ? thanx
"can you provide me the coding of how to convert hexa value to decimal." I'm guessing that 'hexa' means hexadecimal and that what you really mean is binary. I'm also guessing that when you say 'decimal' that you mean the ASCII representation of the binary value. If I have guessed correctly the function you want is probably sprintf().
If you want to "roll your own" you may find this: http://www.programmersheaven.com/zone5/cat27/34429.htm and this: http://www.programmersheaven.com/zone5/cat27/32816.htm useful. Enjoy.
"I'm guessing that 'hexa' means hexadecimal and that what you really mean is binary. I'm also guessing that when you say 'decimal' that you mean the ASCII representation of the binary value." Most likely! For an explanation of how numbers can be represented in various notations, and how ASCII-coded characters can be used to implement those representations, see: http://www.8052.com/forum/read.phtml?id=96256