i want hex to dec code
A two-minute solution would be to #include <stdio.h> and to use csprintf(Buffer,"%d",Hexvalue);
Buffer must be declared as char [nnn] big enough to hold the characters plus a terminating null-character.
now i want multiply with 60 and i want decimal value ?how bob?
Will csprintf(Buffer,"%d",Hexvalue * 60u); fit your needs?
my doubt is
i got decimal value for sec i.e rps-> eg.1000,5000 like this
now i want rpm for those decimal value in decimal manner
first pitfall could be 5000 * 60 > 32767 which means you cannot use an int to hold the result.
So you have to use a long variable to hold the result of the multiplication.
Next question: What do you want to do with the result?
for finding rpm and displays it in hyperterminal or LCD , i want hex to dec
Use sprintf(), arguments for formatting attached. sprintf()
will convert numeric to formatted character string, in LCD
datasheet is an API to print a character buffer to LCD.
LCD_PrString(CHAR * sRamString);
Just for the vocabular: you do not need a hex-to-dec conversion but an int-to-ASCII conversion.
ASCII characters represent human readable characters (and a few control chars)
I wanted to make sure I thanked you for your help. I was going nuts. My compiler at work was able to compile. But my PC at home will not compile properly. I will fix that problem tonight. Any way I just wanted to say may thanks for your help.
hai. i want to changed the adc value from hexa decimal to decimal, i am using a PSoC microcontroller. software is PSoC creator 2.1 k. Help me to convert the value.
My code is follow...
/* Start the components */
/* Start the ADC conversion */
/* Display the value of ADC output on LCD */
output = ADC_DelSig_1_GetResult16();
/*  END OF FILE */